Very deep tl;dr “advanced” Typinator, below.
In another topic here I wrote this about Typinator
Here’s why I think Typinator in many of my personal use cases is a better choice for me. (I won’t be prescriptive about this; just descriptive.)
For example this Typinator expansion .daily which generates the beginning content for my Obsidian daily note:
---
{{MyUUID={/AppleScript do shell script "uuidgen"}}}{{myVault=?What vault}}NoteID: {{MyUUID}}
Tags: {{myTages =?What tags}}
---
%% My Link: [{{?Link Text<{".dw"}>}}]({{MyLink=obsidian://advanced-uri?vault={Scripts/Encode URI.scpt {{myVault}}}&uid={{MyUUID}}}}{{MyLink}}) %%
For background, I explained here how I used the Advanced Obsidian URI plugin to create note-specific links of the form
obsidian://advanced-uri?vault=<enter-your-vault-name>&daily=true&heading=Log%20Notes&mode=append&data=%0A%23%23%23%20[[date|%A %B %e, %Y %I:%M %p]]:%20[[title]]%0A%0A[[body]]
The Typinator expansion has macOS generate a UUID
{{MyUUID={/AppleScript do shell script "uuidgen"}}}
then it prompts for the name of the current vault and any tags I want to add to the YAML front matter of the note
{{myVault=?What vault}}NoteID: {{MyUUID}}
Tags: {{myTages =?What tags}}
and then it puts the link into a comment (bracketed with %%…%%
). I do this because I like copy that link into lots of other places external to Obsidian and it’s helpful to me to have the obsidian://…
link in front of me to make copying easier.
%% My Link: [{{?Link Text<{".dw"}>}}]({{MyLink=obsidian://advanced-uri?vault={Scripts/Encode URI.scpt {{myVault}}}&uid={{MyUUID}}}}{{MyLink}}) %%
This part of the snippet creates a dialog to prompt for name of the current daily note, which happens to be the same as the date generated by my .dw expansion (e.g., 2022-02-03 Thu) so that expansion is called from this expansion. Then the relevant parts of the link are URI encoded by calling a built-in script “Encode URI”.
Not shown, above, are two additional parts of the snippet that grab and parse JSON from the Hebcal and Sefaria sites to add dozen or so textual references and links relevant to that date to the first part of my daily note.
This is really dense, sorry
I used to have a really long KM macro with a lot of actions to put this all together. I was amazed when I experimented with doing this sort of macro (“expansion” is not the best term here) in Typinator how easy it was to compose the macro with the bits and pieces that other expansions could do for me, and how much simpler it is to create dialog boxes with Typinator, and how fast the whole things works. And how easy it is to move the formatting, spacing, etc., around to get the result looking just as I want.
Once I type .daily the result is added to the note in a literal second. Even with all the outbound JSON calls.
The limitation Typinator imposes is that you have to type a string to initiate an expansion. Shortcuts and function keys are not triggers. For that, you need KM, or Alfred, etc.