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
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.
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.
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 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
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.
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
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?