obsidian-advanced-uri
obsidian-advanced-uri copied to clipboard
Is it possible to click on confirm button when executing command with advanced uri?
Let's say I want to execute Export to Pdf command from powershell
URI looks like this
obsidian://advanced-uri?vault=Project_Obsidian&filepath=URI.md&commandid=workspace%253Aexport-pdf
After executing command I see a modal asking for additional options and button "Export to pdf"
Can I add additional arguments to this uri, so I won't have to press button manually?
Right now I'm using ?eval argument to execute some js and manipulate DOM to select options and click button, but this seems like a bad solution. Would have been better if I could pass all arguments through uri
Also, is it possible to execute from command line in background on windows/linux? Without opening GUI
It's now available in v1.43.0 :tada: Just add confirm=true as parameter to the command uri. It looks for the first main button and clicks it.
confirm=true indeed is working well, thank you for adding this feature!
However, then a system dialog pops up, asking where to save the PDF (and then the PDF opens right after export). Do you know if there is a way to save the file to a default location such that no dialog would pop up? This would allow me to fully automate my workflow.
I tried that myself as well, but couldn't find a way so far.