[Plug-In] Create a note from a template note
I first developed a plug-in for a new note with a hard-coded template.
This newplug-in is an evolution, in which the template is a standard note, and only the template note name is hard-coded.
The template syntax is à la handlebars.js : variables are enclosed in double curly brackets. This way, the template seems familiar.
The plug-in and instructions are available on github: https://github.com/BrBorghi/new_note_from_template
================
There were discussions in this forum about having a specific folder to host templates. So I tried the most straightforward solution: hosting the template in the main note folder. I must say I find it very convenient. I need only one template anyway, and I used a convention of a 000000000000 zettelkasten id, so that I can find it easily. I find convenient to be able to edit the template from within The Archive, as I can see easily the result.
Coding this plug-in, I didn't see where the properties of the note object were documented. I didn't see if I can open a note giving its name as a parameter, so I travel the whole liste of notes until find it - this may be long if there are many thousands of notes.
I suggest that the API give readonly access to internal variables such as the author name, so that we could include them in the template.
Howdy, Stranger!