notaapp / talk

Issues and discussions for the notes app, Nota.
https://nota.md
60 stars 1 forks source link

Feature Request: Creation hook #201

Closed minthemiddle closed 2 years ago

minthemiddle commented 2 years ago

When I create a document in Nota, I want to add an unique ID (I don't use ID headings but human readable) and include the creation date in the markdown.

Right now, I use an Alfred workflow to create the markdown that has both ID and creation date.

It would be nice to be able to do it natively in Nota, i.e. when creating a note within Nota.

Maybe a creation hook could be added that get's executed when a file gets created.

astoilkov commented 2 years ago

The next release of Nota will include a Templates feature. You will be able to add a _template.md file in a folder and create a unique template. You won't be able to add a unique ID but you can add a timestamp.

Will this work for you?

minthemiddle commented 2 years ago

Depending on how the timestamp will work, I might even get a "good enough" ID creation. But yes, the template alone will help a lot already.

astoilkov commented 2 years ago

@minthemiddle Did you have time to experiment with the Templates feature? Does this work for you?

minthemiddle commented 2 years ago

@astoilkov It does work.

For me, it's not the best working feature as I work with timestamped Zettelkasten files and I can not set the filename automatically with templates, just the heading.

Example template in my inbox. This gives me the title plus a timestamp for the heading, but then I have to manually copy this to the filename. I guess it's complicated to do it automatically.

# {{date:YYMMDDHHmm}}-{{title}}

{{caret}}

ID:
Created at: {{date:YYYY-MM-DD, HH:mm}}
astoilkov commented 2 years ago

@minthemiddle We can transfer the heading of the file to the file name. Will that work for you? I think it's a good idea in general for all users.