kzhovn / uri-commands-obsidian Goto Github PK
View Code? Open in Web Editor NEWExecute URIs from the command palette
License: MIT License
Execute URIs from the command palette
License: MIT License
If this can be supported, one can paste the link to other external apps and open the desired Obsidian note/header/block there.
A setting to disable the notice that appears whenever a command is executed would be nice, thank you.
It would be great to add the current line as an accepted parameter. Especially useful for sharing e.g., tasks to other apps and services.
PS: Very happy this exists. I can now take a similar idea off of my plugins-to-build list. Great work!
Thanks for your plugin! Is there any possibility to add the current file path (I mean relative path in the vault) to placeholder?
Before I realized #3 was an issue, I kept hitting a hotkey over and over and nothing was happening and couldn't tell whether it was Obsidian or Calibre. I ended up adding a new Notice(
Opening ${URIString});
line before each window.open()
so that I could see exactly what URL was being launched, which was helpful both for finding a problem with my configuration, and for getting active feedback that the command was being invoked at all.
I suspect other people might find this useful as well.
(Though perhaps a more robust version that cuts off the URL after it gets to a certain length would be best, since fileText insertions could make for some huge notices!)
The code in URIModal sets a new ID for a command each time it's edited, instead of only assigning an ID once, when the command is first created. This causes hotkey assignments to be lost, because Obsidian stores them by command ID. So every time you edit a command, you have to go back and re-assign a hotkey to it, and the old hotkey assignments will accumulate in Obsidian's hotkeys.json.
The fix would be to move the ID assignment into the if
branch for creating a new command, so that once it is created, a command will always have the same ID.
Hello @kzhovn !!!!!
This FR is simple to explain: would be amazing to be able to built custom URI using the content of the clipboard.
I use the obsidian URI to search content from my active note using this URI attached to a hotkey.
obsidian://search?vault=vault_name&query=content:""
I realize that most of the time the content that I am searching is already in the clipboard.
This way, I need a {{clipboard}} placeholder to automatically search from the clipboard.
obsidian://search?vault=vault_name&query=content:"{{clipboard}}"
Thanks for reading this :)
I wish you a fantastic day!
Using {{fileText}} within URIs prevents the command from running.
All of the following work as expected:
obsidian://open?vault={{vaultName}}&file=Untitled
https://en.wikipedia.org/wiki/{{fileName}}
mailto:[email protected]?subject={{fileName}}
whereas the following all fail silently
obsidian://open?vault={{vaultName}}&file={{fileText}}
https://en.wikipedia.org/wiki/{{fileText}}
mailto:[email protected]?subject={{fileName}}&body={{fileText}}
Dis-proven hypotheses:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.