The ball is in Obsidian’s court, but the good news is that you can put hook links in your notes and you can link other documents - if they work with hook - with a note by directly going to the note document in your vault. Obsidian has now made it easy to reveal the note in your vault by right-click on the document name.
Huge +1 from me too! I’ve only recently started using Obsidian after switching over from Joplin, and it is absolutely amazing!
I use NotePlan for Markdown notes and todos, and it has a great x-callback-url API: https://noteplan.co/faq/General/X-Callback-Url%20Scheme/ that allows any app to open a note in Noteplan from a URL like noteplan://x-callback-url/openNote?noteDate=20180204
If Obsidian did the same, note only would Obsidian be able to open NotePlan’s notes dir and visualise the graph, but Hook could glue the two together and allow NotePlan to open pages in back in Obsidian.
That would be an unparalleled level of Markdown knowledge management awesomeness!
I want to highlight this topic. The more I use both Hook and Obsidian, the more obvious and natural it seems to me to have Obsidian to do the native Hook linking. According to @LucCogZest, this is a relatively easy process from the development side. Obsidian developers, I’m not going to @ you because I know that’s rude, but readers, if you would like to see Hook and Obsidian work together, please let’s raise the visibility of this and try to get it on the roadmap.
No, it’s not done. There are workarounds – the Show in Finder trick and then use Hook from there – but Obsidian would be so enriched by having the full Hook functionality. For example, there is a feature in Hook where you can be on a web page, for example, and then use something called “Hook to New.” That creates a new note which is automatically deep-linked to that website on your computer. Currently, we can Hook to New in apps like DevonThink or BBEdit, and having Hook to New in Obsidian would be amazing.
Thank you. I will work with the developers at Hook to see if they can build the plug-in and will let you know if there is anything else needed from the Obsidian side.
Get Name (which is now optional if the name is returned as part of the address),
Open Item
New Item
The recent support for custom URLs in Obsidian should mean not having to do a custom Open Item. I think I saw support for a new item too, but would have to look around more.
The hard one is Get Address (and Get Name). My understanding is that Hook compatibility is done through Applescript, so Hook would need a way to ask Obsidian for the address and name of the currently viewed. I’m not sure if that’s possible for a plugin yet, or would have to happen to some degree in Obsidian itself.
I had a breakthrough! And it doesn’t involve any extra code in Obsidian so far!
open ~/Library/Application Support/obsidian/obsidian.json
look at last_open to see what vault was last viewed, and make note of it
look at vaults to find that vault
make note of the vault’s path
open path/to/vault/.obsidian/workspace
look at the first item in lastOpenFiles to get the relative path
generate a obsidian with the vault and file path: obsidian://open?vault=<vault id>&file=<relative path>
It doesn’t look like the obsidian URI supports creating new files yet. It could be done by using a similar approach, and then creating a file in the vault’s path.
That said, I got it working Here are Hook scripts for Obsidian
Open Hook -> Preferences -> Scripts -> “+” and then browse select Obsidian
Also, I think I found a bug: your get name script is struggling to get accented characters (such as ã, á, â…) correctly. See attached image bellow for an example:
It should read 2020.2. Supervisões de…
Perhaps this is something easily fixable, perhaps it’s not… I don’t know JavaScript enough to judge it.
Anyway, this is still the best way to extract links to Obsidian notes via Automation
@ldebritto I don’t have any accented characters in notes yet, but I can take a look. Is that screenshot from Hook when you go to link? Does it display correctly in Obsidian?