Delete Bookmarks Created in Hook 2.0 (Unidirectional Link)

Is it possible to remove or delete a bookmark that is not “hooked” to another resource? I know that Hook 2.0 creates a bookmark every time you copy a link to a resource, but I have generated tons of bookmarks because I use the universal/deep links in other applications. I’ve tried using the Hook CLI and Apple Script. I even tried deleting the bookmark directly from the database. I see the unhook functionality that removes the bi-directional link between two resources but nothing that removes the bookmarks entirely.

thanks for asking, @
xlZeroAccesslx. And Welcome to the Hook Productivity Forum !

Hook is not a standard bookmarking app. Hook creates bookmarks when you engage in linking. (We’ve been asked to create bookmarks for every invocation of Hook but have resisted that.)

Hook exposes these bookmarks to the user for his or her convenience via a UI.

We categorically advise against doing that. Any direct manipulation of the database can cause instability. Hook is easy to use, and the logic of the database may seem simple, but the internal logic of Hook (and the thought behind it) is rather complex. The DB state almost certainly has assumptions that are not obvious to the user.It is not designed for direct manipulation by the user.

We are committed to openness, which is why we provide: export & import and an automation API for Hook.

I will talk to the dev team about guidelines for deleting bookmarks from an exported version of the Hook database.

In the future, the AppleScript dictionary might support deletion of bookmarks (with exceptions for hooked bookmarks: i.e., unhook before deleting.)

We do intend to provide a UI for deleting bookmarks. It will come with warnings for some conditions, e.g., if the bookmarks are part of hooks (bidirectional links), and for hook://file/ bookmarks. The latter is because you may have pasted those URLs somewhere. By deleting the internal hook://file bookmarks, the pasted URLs will not be as robust.

I’ve taken the liberty of moving this topic into the Feature Request category. (We had already logged the feature internally but haven’t gotten to it yet.)

2 Likes

Thank you for the prompt feedback! I’ve enjoyed using Hook over the last few months. It has helped me tremendously with linking information together and I use the bi-directional linking functionality all the time.

Sometimes I use Hook to generate a deep link so I can add it into an application. Here’s one of my use-cases for deleting bookmarks:

I use the Bear app as a Bullet Journal. As I’m logging things I have done throughout the day, I like to associate the universal/deep link of the action to the individual bullet (if there is one). For example, today I logged:

“- Asked about Removing Bookmarks on Hook Productivity Discourse”

which ultimately turned into

“- Asked about Removing Bookmarks on Hook Productivity Discourse

I could create a hook between the Bear note and the Discourse post…but then I can’t retrieve the information in my iPad and iPhone. If I decide to move my Bullet Journal from Bear to another app in the future, I would have to develop a script to change all the hooks from Bear to whatever app I move too and the Bear bookmarks would still exist inside Hook. In my example above, I’m left with a bookmark for the Discourse post and I see it every time I use the bookmark tool or the Alfred workflow. It may not be the best example because I’m using Hook to copy a website URL, but I do this with linkable apps all the time (Agenda, OmniFocus, Drafts, Slack, etc). I don’t usually do this with files…If I’m going to use Hook with a file, I will create a hook between it and something else.

1 Like

@LucB, am I correct that currently there is no way of deleting hook links? I’ve created a lot of them while was testing this linkback script for Bear… I wish to remove them.
Or maybe I can delete the whole DB, as I haven’t started using it in production yet?

UPD: I figured it out using import-export feature. Thanks! I’m still wondering if I could achieve this using UI.

You can delete hooks, but not yet bookmarks. A hook is accessible contextually and for deleting contextually from the Hook window

a) in the context of the resource in which Hook is initially invoked, or
b) by navigating to its target resource with Hook (if the initial resource is in a hook-network referencing the target).

Soon, you’ll be able to remove Hook bookmarks in Hook’s Search mode (context free). Later from a new Hook navigator window (not yet released).

Terminology:

1 Like

Hey @LucB, any update on this? I found an annoying behavior caused by trying to use the Hook tagging script with DT3. I thought I was very clever to make Hook links to DEVONthink groups, and while it WAS clever, the problem is that I like to operate with “Inherit Group Tags” turned on. So what happens is that the DT3 AppleScript is able to properly identify which files have Hook links inside Hook, but then for the groups, EVERYTHING under it inherits the tag…which makes the Hook tag completely useless.

So, I’m trying to figure out how to delete bookmarks in Hook, but it seems maybe that’s not possible yet?

How do I do this?

Martin

Top entry in the HOOKED Link menu:
Hook Window – Hook:

Ah, I see. Thanks, I was confusing hooks with bookmarks, which (as I understand it) can’t be deleted.

Martin

Hi @LucB, is there an update on this ability yet? I have multiple bookmarks that are now obsolete. Thanks