suchnsuch / Tangent

The publicly-available modules of the Tangent project.
141 stars 8 forks source link

Creation Rules should support file templates. #30

Open taylorhadden opened 10 months ago

taylorhadden commented 10 months ago

A note creation rule should be able to reference a file template when creating the note.

There are a couple of open questions here:

WhiskeyJack96 commented 10 months ago

Some of my thoughts:

Given the above points I think storing templates out of band of the application might be ok? Perhaps a .templates or even in the .tangent folder?

As for wildcards/replacements perhaps deciding on the syntax but providing only a few simple things would be good to start (to limit scope) perhaps current date and/or the note title?

taylorhadden commented 10 months ago

Interesting! I was leaning towards templates being normal markdown files with some light markup assistance for the wildcards. I suppose they still would be regardless of whether they lived inside the .tangent folder or not.

The question of linking notes to the templates that they were generated from is definitely an interesting idea. I'd ideally like that to be as simple and plain-text-ey as possible, but I also don't want to add a bunch of metadata cruft to generated documents.

The concept of re-templating content is really interesting, but also potentially seriously complicated.