Zotero 6/beta compatibility

Hi,

I have seen that Hook should work with Zotero, but I found myself testing Zotero’s beta (i.e. version 6, to be available later this Fall) and Hook doesn’t seem to be finding its way in it (“no linkable item”).

Any plans to make Hook compatible with Zotero? As an academic 50% of my work involves touching Zotero one way or another :slight_smile:

Thanks!

1 Like

Would be interested in this as well. The only thing holding me back from using Zotero’s Beta (v6 is announced for later this year) is the current lack of compatibility between Hook – that I’ve grown so happily accustomed to – and my Zotero DB that I just need on a daily basis. Hook works beautifully with v5 and I look forward to a fix. - Thanks.

1 Like

We just updated the script server for Zotera 6 beta. Could you please go to Hook preference window ->Update tab, click on “Check Now” button to update the script? Please let us know whether it works for you.

Thank you

1 Like

just clicked on “check now” but it said i was up to date — 3.2.1 (4468) scripts version 180

still not working though

Could you please restart Hook and see if it helps?

If it is still not working, could you please
(1)select an item in Zotero beta
(2)run the following script in /Applications/Utilities/Script Editor and see if there is any error message?
(3)see if there is any error message

use scripting additions
use framework "Foundation"

set zotext_result to do shell script "curl -s -d selected=t\\&format=json  -G http://127.0.0.1:23119/zotxt/items"
set str to current application's NSString's stringWithString:zotext_result
set theData to str's dataUsingEncoding:(current application's NSUTF8StringEncoding)

set {res, theErr} to current application's NSJSONSerialization's JSONObjectWithData:theData options:0 |error|:(reference)

if res is missing value then error (theErr's localizedDescription() as text) number -10000
set aList to res as list
set theName to title of item 1 of aList

set zotext_result to do shell script "curl -s -d selected=t\\&format=key  -G http://127.0.0.1:23119/zotxt/items"
set str to current application's NSString's stringWithString:zotext_result
set theData to str's dataUsingEncoding:(current application's NSUTF8StringEncoding)

set {res, theErr} to current application's NSJSONSerialization's JSONObjectWithData:theData options:0 |error|:(reference)

if res is missing value then error (theErr's localizedDescription() as text) number -10000
set aList to res as list
set theLink to item 1 of aList


set theLink to "[" & theName & "](zotero://select/items/" & theLink & ")"

return theLink

Thank you

Thank you for the info!
Do you have zotxt installed on your machine?

If yes, could you please run the following command in /Applications/Utilities/Terminal and paste the result here?
curl -s -G http://127.0.0.1:23119/zotxt/items -d selected=t&format=json

Thank you

1 Like

Would be possible to get Hook link to active open PDF in Zotero 6 built-in reader?

For linking from library I am using Markdown tranlator (it may be useful for someone)

1 Like

No, I don’t have zotxt installed. I’m sorry I don’t have much time on my hand to debug this right now.

Hook will not work with Zotero if zotxt is not installed. Sorry we didn’t make this clear to the user. When you have time, you can install zotxt and see if it solves the problem. We will try to make that clear.

Thank you and sorry about this

1 Like

Thank you for contacting us! We will have a look.

1 Like

@bchend had some time tonight to install the extension — it works!

Might have missed that Hook required this plugin somewhere along the line.

Thanks for helping.

On Mac M1 with Montery I still have problem with linking items from Zotero with Hook,
using zotxt gives me no end point not found, I commented on specific issue here version endpoint not found (zotxt 5.1.4) · Issue #29 · egh/zotxt · GitHub

I created a topic on Zotero forum to ask for linking from currently opened pdf (not from library view)

Even more great would be to have possibility to link to a particular annotation in sidebar

Currently Zotero 6 doesnt work with Hook due to zotext incompatibility with the latest Zotero 6 release https://github.com/egh/zotxt/issues/31

This combination worked for me on v 6.0-beta.5+8b7afcf24 - thank you very much!

2 Likes

Currently Better Bibtex and Hook still cannot be shared in Zotero 6.

Just to round out these topics: updated zotero:

Interestingly Zotero 6 has now option “Copy as Markdown Item URI” (Shift +Cmd + C) to get the URI of the currently open PDF, not only item from library, x

Shortcut has conflicts with my other app, I would like to use Hook as the united interface for everything too :slight_smile:
So it is possible to get the URI via a shortcut (so it means it is exposed) it would be possible to get this via Hook too? (After some scripting)

I still have "No linkable item found in * Zotero* when I am not focused on an item in a library (hook only works on items in library view as before)
I am on Version 3.5 Beta (4712; Integration v. 208), MacOS 12.3.1
Zotero 6.0.5-beta.2+c510d9146

I am not versed in apple script but this would involve more or less this in pseudocode?

tell application Zotero
    tell current window
    tell application "System Events" to keystroke  SHORTCUT
 RETURN output TO HOOK

If someone make this psuedocode work, Hook doesn’t need then Zotext and could hook open pdfs

I don’t use zotero myself but this is what one would expect. One can just get a link to a specific entry in the library. Is there a notion of different Zotero libraries, and you’d like a link to an entire library?