Hook links?

So much to like about Bike already: all the essential features of an outliner with fine control over the GUI and no clutter. Interoperability with other apps is crucial. Supporting Hook links would be a great addition, and should be fairly simple to implement since Bike is scriptable.


Can you explain the mechanism that Bike needs to support. I know if I read through the Hook site I should be able to figure out, but my brain is a little frazzle. What exactly does Bike need to for this?

You’d do best to talk directly to Luc at Cogsci for the low-down. My understanding is that Hook needs to load a script to link to specific topics within Bike. The range of compatible apps suggests that this is not demanding. The advantages of being able to link directly from specific topics in specific Bike documents to Finder items or specific places in other documents is obvious. Hook has become an indispensable part of my workflow.

1 Like

This was pretty easy to setup and works well for bidirectional linking:

Go to Scripts in Preferences and hit the + button in the bottom left to select the Bike app.

Then add the Get Address script

And the Get Name script


Perfect @robm. Your scripts work beautifully to connect Hook
The main benefit for someone like me (who prefers the simple, who doesn’t run aircraft carriers) is that Hook now reads the contents of the row where I have placed my cursor so context is clear in Hook.
However, I also like to just copy link in the edit menu and paste that link into another workspace. Thanks for sharing your script with us. Super easy to create.

1 Like

Thank you for the scripts robm. It was simpler even than I thought. But. A couple of issues:

  1. I’m finding that while I can copy a link out of Bike and paste it into a link created via Add Link to URL… in Nisus Writer, it will not work if I simply paste from Hook into the current document in Nisus. It will appear to create a link with the name got from Bike, but the link will not work. Probably a Nisus thing because the direct link works fine from TextEdit, but then direct Hook links from other apps work fine in Nisus, so maybe there is a refinement that could iron this out.
  2. Following a good link back to Bike, it opens the item Focussed in; would there be any way to have the item selected but Focussed out? Not sure what determines this.

Lovely, thanks for sharing, everyone. I use TaskPaper all the time. I’m delighted to learn about Bike!

Hook works with Bike “out of the box”, using Hook’s built in integration script that uses hook:///file/ URLs. We’ll soon give users an advanced option to use bike:// URLs . You’ll just need to do this from the command line:

defaults write com.cogsciapps.hook integration.bike.URL.scheme bike-default

and can revert to hook://file/ URLs by doing:

defaults write com.cogsciapps.hook integration.bike.URL.scheme hook-file.

Or Hook Pro users can edit the integration script (which will have both options). We’ve done this kind of thing with some file-based apps like Obsidian and nvUltra.


At present, if the suffix is bike, you can link to the block, that is, the position of the line, but the bike can open the markdown file, hook can obtain the deep link, but when you open the link again (file closed state) can locate the file, and can not locate the block, hope to repair the script

Not an issue of “repair”, or of “scripts”.

Linking to specific lines is enabled by row-specific identifiers.

The .bike file format contains these identifiers,

(see the id values here):

Expand disclosure triangle to view Bike XHTML source
<html xmlns="http://www.w3.org/1999/xhtml">
    <meta charset="utf-8"/>
    <ul id="3ZEwkE5k">
      <li id="95">
          <li id="am">
          <li id="je">
          <li id="v_">

but plain markdown texts do not:

- alpha
    - beta
    - gamma
    - delta

If you wish to link to particular lines, you will need to use the .bike format, with its unique row-specific ids, on which that feature is based.

(Don’t have permission)