Using Hook with Obsidian
Last updated 2021-01-19 23:41
Hook Integration scripts version 139 introduced support for the Obsidian note-taking app. We’ve been tweaking the support since then. And Obsidian plans to add additional support to which we expect to adapt Hook.
This means you can now link your Obsidian notes to just about anything.
Currently supported functions
The current integration of Hook with Obsidian makes use of
obsidian:// links. It supports:
Copy Linkin Obsidian
Copy Markdown Linkin Obsidian
Copy All Linksin Obsidian
Hook to Copied Linkin Obsidian
and related functionality (e.g., find and Hook window navigation).
Limitations of Obsidian integration and planned functionality
Please note that Obsidian is still in pre 1.0 beta. Hence the following limitations.
If only one Obsidian vault is open,
Copy Link and
Copy Markdown Link copy a link to the currently open document. However, if more than one vault is open, Hook will obtain a link to the document that was mostly recently opened, which may or may not be the frontmost open document. More precisely when there is at least one open document, this always returns a link to the “most recently opened document”; this is equal to the “currently document” if there is only one vault open, otherwise it may or may not be. This limitation is because Obsidian does not yet provide an API to copy the link to the frontmost document. Our integration script therefore uses a heuristic.
We plan to support the following in Obsidian too:
Hook to New(Not yet supported because Obsidian does not have an API for this either. However, the Obsidian dev have indicated they will provide a solution for this).
Reveal File in Finder
hook://file/URLs (see next section)
In this section we share a “Get Address” scheme that returns
hook://file// URLs rather than the default
This will be handy because
obsidian:// URLs currently are not robust: if you rename an Obsidian file, the
obsidian:// will break — (presumably that may change by the time Obsidian exits beta).
hook://file/ URLs are robust. You can even move files outside of Obsidian and
hook://file/ will remain.
hook://file/ URLs will also have the advantage that the URLs you obtain for files managed by Obsidian, in the context of other apps than Obsidian (such as Finder, nvUltra or BBEdit), will be the same as those you get within the context of Obsidian itself
A disadvantage is that it does not yet seem possible to make Obsidian the default app for opening any given file extension. This is a result of Obsidian being an electron app. Developers need to put in extra work to make electron apps behave like native ones. Obsidian is still in beta; we assume by the time Obsidian is out of beta, this too will be resolved.
How is Obsidian relevant to Hook users
- Obsidian is a note-taking app. A major function of Hook is to enable you to connect your notes, in the app of your choice, to what they are about..
- Like Hook, Obsidian values links, treating them as first class data objects.
- Obsidian is built to be extensible, with several plugins. (Hook is both highly extensible and automate-able).
What is the Obsidian app?
Per its home page Obsidian (2020-12-08), Obsidian is
a powerful knowledge base that works on top of a local folder of plain text Markdown files.
The Obsidian Features page (2020-12-08) boasts:
LINK AS FIRST-CLASS CITIZEN
We want your second brain to work like a real brain, so Obsidian encourages you to make connections between your notes. Simply type [[ and Obsidian will auto-complete the link.
With connections in place, you can navigate your notes and get inspiration with backlinks and graph view.
Thanks also to many Hook Productivity Forum members who contributed to this discussion .