Linking Obsidian resources to anything

Several people have expressed an interest in being able to automatically connect their Obsidian files to other resources.

For example,

Hook would facilitate this linking if Obsidian had a linking API. We will look at their plugins to see if they do the job. (Perhaps someone has already done the research?). If so, we may pursue that. But it would be better for Obsidian to have the support universally without additional customization.

On Obsidian’s forum , haberjr has kindly posted this Compatibility with Hook Productivity on Mac OS - Feature requests - Obsidian Forum. I invite anyone who wants this feature to like that post and perhaps contribute some comments. I am writing my own reply.

We can use this new topic here to pursue the discussion on our side too. But over on Obsidian’s side would be most effective if it Obsidian were to add an API, knowing that most of the best note-taking Mac apps do provide an API.

My reply on Obsidian’s forum is here.

2 Likes

I have early access to a developer build from Obsidian, version 0.81. Usually they release this for the public in about 5-7 days. In this version they include an outliner plugin. When you activate this plugin, and you right-click on an Obsidian note in their file browser, you can open the note with your default markdown app e.g. IA Writer for me, or you can open the folder in which the file is located.

This makes it now possible to easily create a hook link to the underlying Obsidian note. It is not the easiest way - but it is now easier to do it which is great. Thumbs up for Obsidian developers - I did request this feature specifically with Hook in mind.

1 Like

I would very much like that functionality, but I’ve enabled the Outline plugin, and I don’t get the right-click behaviour you describe. All I get when I right-click on a file in the Obsidian file list is Rename, Delete, and Make a Copy.

Is there something else I need to do? I’m on MacOS Catalina, 10.15.6, for what it’s worth.

Ah! Turns out there’s another plugin: “Open in default app.” That’s the one that gives the behaviour you describe.

1 Like

Thanks!

Yes! they are a very promising developer with a very promising product. Their emphasis on linking is very consistent with Hook’s philosophy.

Hook is on their radar and they’re on the road to providing the required integration. They’re moving towards their official release so understandably they are juggling a lot. I think they clearly see the value in being able to link their notes to all kinds of resources :wink: .

Anyone interested in Obsidian and Hook might also want to check out this forum topic on their site that @haberjr initiated: Compatibility with Hook Productivity on Mac OS - Feature requests - Obsidian Forum

Here’s my kludgy workflow for linking an Obsidian page to external items using Hook:

  1. Using Finder, HoudahSpot, FoxTrot Pro Search, etc. create a collection of files and give them all a temporary, unique-to-that-collection tag. I call these “convocation”-tags, which in this case is usually 2hook + the current date (YYYY-MM-DD); I delete these later!
  2. In Finder, search for the items with this collection of items, so that you have all the files in one place.
  3. Switch to Obsidian and navigate to the Obsidian page that you want to Hook to the files. Add a #hooked tag, to indicate that the page is linked (as a Markdown file) to other external files, websites, etc. Then use “Open in Folder” to reveal that page as a Markdown file in Finder. Drag-and-drop that file onto the Hook menu icon, populating the top panel in that window.
  4. Switch back to the Finder and drag-and-drop the files onto the Hook menu icon, populating the bottom panel in that window.
    Voilà! In the background, the Obsidian page’s file is reliably linked to several other files on your computer, even when you rename them, move them around, etc.

As per the latest insider build, Obsidian now has an official URL scheme.

3 Likes

Would be keen on Hook working with Obsidian now that the the app has an official URL scheme. Thanks for looking into this!

1 Like

We’ve asked the dev about providing an API for linking. This is an objective of theirs; but they told me they need to do other stuff first towards.

Is there a user interface to copy links? I couldn’t see it in their UI. I installed version 0.9.2 (It does not have an “About” menu either – the menu items are quite limited as far as I can tell:

Am I missing something?

For people who are content to use hook://file/ links with obsidian, a simple trick is to use Finder. Smart folders (and/or Trickster) can help. If needed and if acceptable, use a smart folder that sorted by recent modification, modify the target file so that it sorts at the top, which makes it easy to access from a smart folder (or from Finder’s Go > Recent).

(Speaking of API’s for linking, we recently wrote this: What’s a Linkable App and Why Does Linkability Matter? – Hook.)

Couldn’t the Using obsidian URI be used by Hook for linking with Obsidian documents?

You could:

  1. Assign a keyboard shortcut to your Copy obsidian url () command (doable on Settings > Shortcuts)

  2. AppleScript with System Events for entering the customized shortcut for getting Obsidian URI Link.

The Get Address script would look like this:

tell application "Obsidian" to activate
tell application "System Events"
	-- My "Copy Obsidian URL" shortcut is set to ⌘⌃L
	keystroke "l" using {command down, control down}
	delay 0.1
	get the clipboard
end tell

Same route could give you the Get name:

tell application "Obsidian" to activate
tell application "System Events"
	-- My "Edit title" shortcut is set to F2 (default)
	key code 120
	delay 0.1
	keystroke "c" using {command down}
	delay 0.1
	get the clipboard
end tell

That said, the activation of Obsidian required for these keyboard commands are making Hook unable to fetch the URL back.