[WIP] v1.3's Support for Obsidian Commands

Developing software for Shortcuts is a bit weird, and a lot of things are waaaay more static than you’d expect. Also, Apple’s documentation leaves a lot to be desired. Anyways, here’s what I’m working on at the moment.

The first action fetches the list of available commands from a given vault and saves it locally, i.e. for use by AfO. If you have more than one vault with different sets of commands, you’ll want to run that action for all of them. At the moment, AfO will compile a single list of all available actions from all your vaults which is stored locally, and which can be accessed by the Shortcuts editor, meaning you’ll probably have a separate workflow containing one “Get Available Commands” action for every vault, which you’ll run once every time your command palette changed.

The second action will purge that list.

“Trigger Command” does what it says on the tin, in the editor it’ll let you select one of the actions from the stored list, and when run, that command will be triggered in Obsidian. (The list is searchable by typing, just like Obsidian’s Command Palette.)

“Trigger Sequence Of Commands” executes up to ten commands in one go. (You could also use 10 single “Trigger Command” actions in a row but that’d mean 10× the “dance” on iOS (AfO → Obsidian → AfO) and I’d like to avoid that pain.)

I’m currently debating if I should keep various lists of commands separate by vault but as I’ve said, Shortcuts can be a bit weird and I don’t know yet if that’s …reasonably possible. :wink: