Obsidian&PR Cookbook - π - YouTube - Official Obsidian Docs
If you want to automate Obsidian you can create a custom command and then either run this with the Command Palette or with a hotkey.
One way to define a custom command is to create a plugin. Many plugins give you the ability to define custom commands to do specific things. Plugin REPL allows you to rapidly define commands that run JavaScript from within Obsidian itself.
To do this you can write the following in a note (after installing Plugin REPL).
newCommand(function new_command_name() {
message("hello world")
})
Then execute it by selecting it and running βPlugin REPL - execute the current line or selectionβ. After you do this, the command βnew command nameβ will be visible in the command palette.
If you want this command to be permanent you can put it in the plugin repl init file, `repl.md` which is run everytime obsidian starts.
You can do lots of things with plugin repl - and interact with most of the Obsidian plugin api. There are also a range of convenience functions for rapid development.
I am not affiliated with Obsidian. I am the author of plugin repl.