First a bit of context: The Hook app (amongst other things) enables users to copy a link to the open or selected item of most apps (in various formats: RTF, HTML, Markdown, other plain text), and to hook (bidirectionally link) items together. It provides a uniform command across apps so you don't have to go looking for `Copy Link`, which is often missing. So you can use Hook's `Copy Link` on a file, an email, a web page, a task (e.g., in OmniFocus or Things), etc.
Thanks to Bookend's AppleScript dictionary, Hook is compatible with Bookends. So you can copy formatted Bookend links and hook them to anything.
Now the point of this post
Hook's Bookends `Get Name` script currently sets the name of the link to the title of the selected item. However, we've had ]a request on our forum (https://discourse.hookproductivity.com/ ... tion/1676/) for the default to be the full reference. I'm not very familiar yet with the Bookends dictionary but I proposed some AppleScript for that there which seems to work, i.e.,
Code: Select all
tell application id "com.sonnysoftware.bookends"
set selected_ids to «event ToySRUID» "Selection"
set selected_ids to words of selected_ids --coerces to list
set n to count of selected_ids
if n ≥ 1 then
set sid to item 1 of selected_ids
return «event ToySGUID» («event ToySRUID» "Selection") given «class RRTF»:"false", string:"APA 6th Edition"
end if
end tell
Some people might prefer `Get Name`to default to the citation format instead of the full reference, and I assume there's something in the Bookends AppleScript dictionary for there.
We're open to changing the default format, so we'll listen to what people suggest. And Hook is very configurable, so use whatever Bookends AppleScript support. (You can also change the format of the URL returned using Hook's Bookends' `Get Address` script. For instance, you could configure it to return a hook://file URL instead of bookends:// URL, which would make it easier to open the link to the PDF in another app, like Skim or PDFPenPro for example. But that should probably be discussed in separate topic.)
I've started this topic here and will include a link to it from [the Hook forum topic]((https://discourse.hookproductivity.com/ ... tion/1676/) so that Hook users know where to look for this side of the discussion. And I hope it is of use to Bookends users as well. Given that I run the Hook productivity 'show' and have moved to Bookends, Bookends integration will get special attention
