Hook to an individual task in TaskPaper

A cross-post of a post on the TaskPaper forums about integrating Hook and TaskPaper.

Hook allows you to link “items of content” on your Mac so that you can quickly hop between them using a LaunchPad / Alfred type interface. For instance you can link a file with an email with a website. These scripts allow you to link these things to an individual TaskPaper task. You can jump directly to any of these, or create a new (for example) nvUltra document for this task.

The Hook script and KM Macros, with instructions are on my Github Page.

I’m sure that these could be written to not require KM, but my skills at bridging Applescript to Javascript are not up to the task. If anyone wants to help out, I’d be very happy.

1 Like

I don’t think that particular (ID-based) approach is actually going to work, alas …

Once the TaskPaper plain text file has closed, the editor task IDs evaporate, and next time the file is opened, each line gets a different working ID, which will unfortunately leave your links dead.

( On a separate issue, just glancing at your PNG there, do remember that TaskPaper files are tab-indented outlines and that the unindented tasks shown will not be parsed as children of the two projects for the purposes of folding or path searches )

Hi Rob - Yes - the internal TaskPaper IDs are not persistent between sessions. However, this approach generates an ID for each task and stores it in a tag so it will persist.

RE Tabs - sorry this was just a quick demo created to show it working. Hope I’ve not confused anyone.

1 Like

Welcome to the Hook Productivity Forum , @rcraggs . and thanks for posting this!

this is quite timely, because we’re directing our attention back to deep linking.

(Incidentally, for people new to Hook: a use case of Hook is to ‘hook’ this particular topic (resource) to Hook to a specific task - TaskPaper - Hog Bay Software Support, to enable bidirectional navigation between the items using the Hook window. Copy Link and ‘hook’ actions automatically bookmark the URLs in Hook, making them searchable.

Currently Hook only shows one degrees, but following on what I think was a suggestion by @RobTrew and others, Hook in 2021 will enable users to see n-degrees from the current node. (That will be one of several previously committed new ways to view the Hook networks [plural because they are typically disjoint.] Hook 2.0 already introduced bookmark search. )