Templater (Amplenote templates plugin bounty requirements)

A plugin that lets users build and insert dynamic templates.


The plugin should support the following functionality:

Expand date expressions

Whenever a user inserts a template that has a recognized {expression} in between curly brackets, that should be expanded to its value.

The plugin should support all expressions enumerated here;

Apply date expressions as task start/hide times

If a template has a task whose description includes something like {start:expression} or {hide:expression}, the "expression" should be interpreted and added as a Start or Hide date respectively for that task

Allow the user to customize the format of dates

If a template has an expression followed by a date format specifier, we expand it to the date formatted in that way; eg. {"mm-dd-YYYY":tomorrow} should expand to "09-27-2024".

Convert something to a note link

If a template has text between double square brackets and that selection is eligible to be converted into a link, it should be converted into a link.

Examples:

[[January 2nd, 2025]] will be converted into a link to a note called "January 2nd, 2025". If that note does not exist, then it will be created. We consider a note "does not exist" if there is no note with that title in the user's notebook.

[[daily-jots/January 2nd, 2025]] will be converted into a link to a note called "January 2nd, 2025". If that note does not exist, then it will be created and tagged with "daily-jots". We consider a note "does not exist" if there is no note with that title and that tag in the user's notebook. So in this case, if there is a note called "January 2nd, 2025" but has any other tag (or no tag), we consider it "does not exist" and create a new one and tag it accordingly. If the note exists, it will just be linked to.

Note: links to notes generated from date expressions should work, eg. [[my-tag/{tomorrow}]]

Insert a template at the current position

Plugin should allow the user to type { followed by the plugin name and action to insert a template's contents at the current position

Smart insert based on current indentation

Plugin should detect if the the user is currently using { inside a bullet, numbered or task list. If the template to be inserted starts with a bullet, numbered or task list item, then that template will be inserted at the current indentation level.

Allow the user to select a default template for new notes (in a tag or not); should work for daily jots

Plugin lets the user assign a template to a tag

The effect of that is that when visiting that tag in Jots mode, the user will be greeted with a Jot Suggestion prompting them to isnert the default tag template in the current jot. After this is done, the suggestion disappears.

Plugin also lets the user assign a template to the "empty tag", that is a template that can be inserted when the user visits Jots mode with no tag selected.





(Internal: Templater plugin support feature suggestions)