Skip to content

Customize 'Unique ID' for ZK users #201

@Liqiduan

Description

@Liqiduan

Background

That is not a problem, but an enhancement that other may need (like #105).

I think there are many users are starter who try to using ZK methods for note taking, just like me.

But the describe in #105 is not so proper. The feature we need is not "fuzzy search some word of tilte", indeed it‘s a way we address a note.

So the "part" here is the unique ID which use to distinguish between different notes.

The more widely used format of unique ID is form with date like 202405022227,
but different user may have different ID system. For example, I like to use a short date with a counter like 20240502_01.

In summary, I really want to customize the format (maybe using a regex?),
so that the backlink/wikilink can work well with the "unique ID".

Requested Feature

In brief:

  1. The Basic: Custom setting the 'unique ID' pattern, and work coperate with wikiLink/backlink/complete/reference.
  2. Advanced: ID generator help create note from 'unexisted' link.

Below are detail descirbe:

Describe to: Custom setting the 'unique ID' pattern, and work coperate with wikiLink/backlink.

Supports user using a unique ID like 202405022227 (YYMMDDHHMMSS),
so the notes under directory notes may look like:

- notes
    - 202405022227-some-note-a.md
    - 202405022238-some-note-b.md

So the link [[202405022227]]/[note-b](202405022238) want to link to 202405022227-some-note-a.md and 202405022238-some-note-b.md.

Some things that link to [[202405022227]].
Here is and other line want to reference to [note-b](202405022238).

Seems using a unique ID means pepole want to change the title without change the link.
So after rename these 2 files to below, the link [[202405022227]] will automaticly change to 202405022227-some-note-a-modifyed.md and also the [note-b](202405022238) change to 202405022238-some-note-b-new-version.md:

- notes
    - 202405022227-some-note-a-modifyed.md
    - 202405022238-some-note-b-new-version.md

And here are some advise for implement:

  1. Allow user set a regex pattern for unique ID.
    Different people have different ID format, so they can customize it.
    And I think this extension not need to check the "unique" of ID, the one use this feature will guard it.
  2. Change the "NoteNameFuzzyMatch" to Identy the unique file.
    filename and unique ID are different way but do the same thing Identy a note. So maybe using a 'unique ID' concept in system scope may help implement that and not affect to other features like backlink.

Here is an implement for that: #202

Describe to: Advanced: ID generator help create note from 'unexisted' link.

Sorry that I am tired today, and i will complete this part latter.

Other Feature & Problem Related

  • Maybe we want to remove uniqueId in title when preview label?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions