New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Reference note by unique identifier #904

Closed
minthemiddle opened this Issue May 4, 2018 · 14 comments

Comments

Projects
None yet
4 participants
@minthemiddle

minthemiddle commented May 4, 2018

Expected behaviour

  • When working on notes in team we often reference notes ("Look at note XYZ")
  • Up until now we only give full names of notes ("Look for 'How to do ZYX'")
  • I would expect to right-click on a note and copy an unique identifier
  • This identifier I could copy and share via Slack or even Whatsapp
  • The identifier could be a MD5 (as with Git) or a number or anything with maximum 10 digits (so you can memorize)

Actual behaviour

  • It is not possible to reference a single note consistently
@pbek

This comment has been minimized.

Owner

pbek commented May 4, 2018

I don't see any good way to do this. QOwnNotes just views text-files in folders. There is no persistent note database. If you are using ownCloud or Nextcloud you could share the note (from within QOwnNotes), then you would have a unique identifier...

Do you have any better ideas / insights?

@pbek pbek added the question label May 4, 2018

@minthemiddle

This comment has been minimized.

minthemiddle commented May 4, 2018

Two thoughts:

  • identifier is similar to a tag (technically you could add an unique tag to each note, but that would spoil the tag system)
  • You could add the identifier to the end of an actual note as key-value text, so e.g. id:f5e4
    • You could auto add it to new notes
    • You could manually add to old notes via a command
@pbek

This comment has been minimized.

Owner

pbek commented May 4, 2018

Ok, say you have such an id in a note, what should happen with it? How should e.g. Twitter open that note in QOwnNotes on an other computer (that only could have one note-folder)?

@minthemiddle

This comment has been minimized.

minthemiddle commented May 4, 2018

For a team reference, no application needs to do anything. I would send the reference to my colleague who accesses the same notes folder and s/he can quickly find the note I talk about.

Me: Look at note a34de (instead of: Search for a note about a code snippet written in python with an import about time…)

@pbek

This comment has been minimized.

Owner

pbek commented May 4, 2018

You could already create such an id and add it to the current note (if not already present) with the help of the scripting engine.
See:

To fetch a note by its id you would need a new scripting function to get all notes (to search for right one yourself) or to get a list of notes where a regular expression matches.

Temporary you can also search for the right note with an external tool (like grep) by running it from a script and load the note with http://docs.qownnotes.org/en/develop/scripting/README.html#fetching-a-note-by-its-file-name

@pbek pbek added this to the 18.05.1 milestone May 5, 2018

@pbek

This comment has been minimized.

Owner

pbek commented May 5, 2018

18.05.1

  • there now is a new scripting command script.fetchNoteIdsByNoteTextPart() to
    fetch the ids of all notes with a certain text in the note text
    • for more information please take a look at the scripting documentation
    • there now is a new script Unique note id in the Script repository
      that generates a 10 character alphanumeric id for the current note and
      also allows to jump to the note by it
@pbek

This comment has been minimized.

Owner

pbek commented May 5, 2018

There now is a new release, could you please test it and report if it works for you?

@pbek pbek removed the help wanted label May 5, 2018

@pbek pbek closed this May 8, 2018

@minthemiddle

This comment has been minimized.

minthemiddle commented May 8, 2018

Works exactly as expected.

@pbek

This comment has been minimized.

Owner

pbek commented May 8, 2018

Great! ;)

@pbek

This comment has been minimized.

Owner

pbek commented May 8, 2018

@sanderboom, @Maboroshy was someone of you also requesting such a unique identifier? I can't remember...

@Maboroshy

This comment has been minimized.

Contributor

Maboroshy commented May 8, 2018

Not me.

@pbek

This comment has been minimized.

Owner

pbek commented May 8, 2018

ok ;)

@sanderboom

This comment has been minimized.

Contributor

sanderboom commented May 15, 2018

@pbek Yes, that was me - for the integrity-check script that I made. Thanks for the heads-up.

If I understand correctly this appends an id string to the bottom of the note-body. I'll see if this is useful ;)

@pbek

This comment has been minimized.

Owner

pbek commented May 15, 2018

You can of course also use the new scripting command to do your own thing. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment