[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!
Categories
- 3K All Categories
- 152 Research & Reading
- 692 The Zettelkasten Method
- 8 Knowledge Work
- 100 Writing
- 464 Software & Gadgets
- 154 Workflows
- 730 The Archive
- 15 Plug-In Showcase
- 88 Resolved Issues
- 225 Projects Logs and Journals
- 83 Project: Zettelkasten.de
- 53 Critique my Zettel
- 171 Random
- 373 Introduce Yourselves!
Comments
Im going to give this a try