This is a proof-of-concept. It makes a small hack to the Stamp tool that allows dynamic information to be inserted. That is, rather than just static snippets, you can have snippets that are interpreted on the fly. This is useful, for instance, if you want to stamp the actual time and date, and not just a macro that can display the (changing) time. This is useful for logging times for various activities.
This only works with 5.3.0 and above, because it uses functions
and the new substitute
filter operator.
There are two example snippets included (and some sample data). One snippet produces a timestamp. The other produces a checklist formatted for markdown based on items tagged “ToDo”. Why markdown? Sometimes I’ll make lists in TW, but want to transfer the list to something like Simple Notes that can give you a live checklist.
The markdown snippet looks like:
### Check List
${[check.list[ToDo]]}$
You can see that you can change the tag to create whatever list you need. You can also modify the function for the date stamp to change the date format.
Dynamic snippets have a field “substitute” that needs to contain some value. I’m vaguely thinking that in the future they might actually contain values to be passed back to the stamp. There are some other limitations (like your titles shouldn’t contain “()” for the checklist), that can be fixed later on if people are interested.
As always, make a backup if you try this. There is no JS modifications, so it should be pretty safe, but you never know.
snippet-hack-release-2023-07-15-1826.json (3.2 KB)
Tab Snippet
Here’s a snippet you can use when you need a tab character.
Snippet - Tab Char-dynamic.json (248 Bytes)