Using Hook with Curio

Curio is a user-friendly note-taking, brainstorming and mind-mapping app for the Mac. It can help you think through cognitively demanding projects. It provides scaffolds for researching, creating, learning and problem-solving. Whether you’re writing a document, developing a video, or creating any other product, Curio can extend your brain.

For a showcase of Curio with examples of using it with Hook, see Curio a Cognitive Tool for Researchers and Creatives – Hook.

Default Integration

As of 2020-08-15 (version 128 of Hook’s integration scripts), by default when Hook’s Copy Link command is used in the context of a Curio document, instead of a curio:// URL being added to the clipboard, Hook will copy a link containing a hook://file/ URL for the document. That is to say that Hook interacts with Curio using its generic built-in scripts; this means that you will not see an entry for Curio in Hook’s > Preferences’ > Scripts’ tab..

alternative

How to make Copy Link return curio:// URLs instead of hook:// URLs

We believe that most Curio users are best served with Hook’s default integration scripts. However, if you would prefer, in the context of Curio, Hook’s Copy Link command to return curio:// links (rather than hook://file/ links), you can follow the following simple steps to add a custom script for Curio.

  1. Select Hook’s > Preferences’ > Scripts’ tab.
  2. press the + button in that tab. This will cause a popup dialog box to appear.
  3. Copy the script below

tell application "Curio"
markdown link to selected item of active document
end tell

    4. Select the Curio app from that dialog box.
    5. Paste the above script in the “get address” tab. You can leave the other Curio tabs blank.
    6. Click the save button (bottom right).

It is also possible to add a new template for Curio, and to configure the New Item script in that tab to use it. See this tip.

Trade offs for choosing which script to use

If you’re not sure whether you want to use Hook’s default way of integrating with Curio (where Copy Link returns hook://file/ URLs) or the alternative provided above (where Copy Link returns deep curio:// URLs), consider the following.

1. Using Hook’s Default Curio integration

With Hook’s default integration,

  1. In the current Curio document, Copy Link and Hook to Copied Link copy hook://file/ links to the URL (not curio:// URLs)
  2. When you copy any link (from anywhere) and then use the Hook to Copied Link command while in a Curio document, the copied link will be hooked to the entire file, not to whatever item you select (in the navigator or on an idea space).
  3. If a Curio document is renamed or moved, links to it (that you obtained via Copy Link) will continue to work (whether you used Hook to Copied Link or pasted them outside Hook).
  4. In Curio documents, the Hook to New menu item is enabled. It creates a new document which it ‘hooks’ (bidirectionally links) to the hook://file URL of the current Curio document.
  5. Hook’s Reveal File in Finder will work on the any saved Curio document.

2. Using the alternative (deep link) integration

With the alternative integration :

  1. In a Curio document, Copy Link creates (i.e., copies) a deep curio:// URL that points to the selected item in the current Curio document. This is equal to using Curio’s Copy As Hyperlink command.
  2. When you copy any link (from anywhere) and then use Hook’s Hook to Copied Link command on the current Curio document, the copied link will be hooked to whatever Curio object is currently selected in that document (or to the entire document if there is no selection). The object could be an entire idea space (selected in the navigator), or an item in the current idea space. That means when you invoke Hook again in the Curio document you will only see the item hooked to the current selection, if any. If there’s no selection, then you will see everything hooked specifically to that document. Hook will be unable to recognize that other items in the document than the one selected are hooked to this document.
  3. If you move or rename a Curio document to which items are hooked, and then invoke Hook again in the context of that document, you won’t see any of the hooks to this document. That is because Curio creates new URLs for documents that are renamed or moved. (When Hook is invoked on a document, it gets its URL and matches it against previous entries in its database. Since the moved document has a new URL, this lookup turns up blank.)
  4. Like hook://file URLs, links created via Hook’s Copy Link, which in this case are curio:// links, will continue to work when you rename or move them. That is to say that Curio robustly serves curio:// URLs. However, the first time you click on a link to a document that has been moved or renamed, Curio might present a dialog box that requires you to open the target document.

3. Principles used by CogSci Apps to determine Hook’s Copy Link scheme for particular apps

If you’re curious how CogSci Apps decides on the scheme of URLs returned by Hook’s Copy Link and associated commands, please consult Principles That Determine the URL Scheme Returned by Copy Link for a Given App – Hook.

About Switching from curio:// hooked links to hook://file links

If you decide to switch from the alternative, i.e., curio:// URLs to Hook’s default integration Hook integration (of version 128 and following) rest assured that all your previously pasted links to Curio documents will remain valid. Curio will continue to handle them as well as before.

However, in that case your prior “hooked links”, the ones that show up in the context of a given Curio document when you invoke the Hook window, will no longer be visible. However, you can carry them over. Here’s how:

  1. Before switching to the hook://file/ URL, create one temporary proxy file per Curio document (i.e., any type of file).
  2. use Copy All Links on each Curio document, applying the result to its proxy document.
  3. After you upgrade to the new format, you can Copy All Links to the original Curio document.
  4. Then you can delete the proxy files.

We discussed Hook’s integration with George Browning, Zengobi Inc , the developer of Curio, who agrees with Hook using hook://file/ URLs.