zotxt-emacs icon indicating copy to clipboard operation
zotxt-emacs copied to clipboard

format of zotero:// links

Open damiencourousse opened this issue 4 years ago • 8 comments

Reading from the source code, I understand that this extension uses the following format for zotero:// links:

  • with zotero cite keys: zotero://select/items/ + key

However, exports from better bibtex can generate links with two different formats, as follows (see here)

  • with the citation key: zotero://select/items/ + citekey
  • with the zotero reference key: zotero://select/library/items + key

However, I could not find a specification of the different link formats, so I don't know how to handle this inconsistency.

Currently, if i drag'n drop a reference from Zotero into an org document, with better bibtex, to generate a zotero:// link, I cannot open those links with zotxt-emacs. I use zotxt-emacs to open zotero:// links, and I would like to have the possibility to use both better bibtex and zotxt-emacs to insert links to references.

damiencourousse avatar Jan 04 '21 16:01 damiencourousse

Hi @damiencourousse ! Sorry for the late response. I think this is mistake in the BBT export. It should look like zotero://select/items/[LIBRARY]_[KEY]. This was an internal format used by Zotero itself - it may still be. I don't use the translators - I insert links directly from emacs - so I hadn't seen this issue.

egh avatar Jan 15 '21 04:01 egh

Thanks for your feedback. I have opened an issue in BBT. Feel free to comment!

damiencourousse avatar Jan 16 '21 15:01 damiencourousse

You are right. The current format is zotero://select/items/[LIBRARY]_[KEY]. It was a misunderstanding from me, since on my setting, [LIBRARY] is 1.

As reported in the BBT issue, this format is still supported but deprecated. Do you plan updating the format of zotero links in zotxt-emacs?

damiencourousse avatar Jan 18 '21 16:01 damiencourousse

As reported in the BBT issue, this format is still supported but deprecated. Do you plan updating the format of zotero links in zotxt-emacs?

Ah, I didn't know that! I will fix this. Thank you.

egh avatar Jan 22 '21 06:01 egh

Hi, I hope it is related to this topic, but I am wondering if zotxt can handle zotero links created by zotfile. Their format is zotero://open-pdf/library/items/. These links open the pdf in a specific page, related to the annotations. I tried to open with the org-zotxt-open-attachment command but It didn't work.

brunoperdigao avatar Apr 13 '21 22:04 brunoperdigao

@brunoperdigao Good question! Right now it can't, but it would be very easy to implement. I assume the item key follows after /items/?

egh avatar Apr 14 '21 04:04 egh

@egh Yes, the item key and the page number, which directs to the specific page, for example zotero://open-pdf/library/items/XXXXXXXX?page=3 I tried to find more information on their documentation, but they don't go into much detail about it: http://zotfile.com/#extract-pdf-annotations It would be great to have this implemented! Thanks

brunoperdigao avatar Apr 14 '21 12:04 brunoperdigao

I had the similar issue on the iOS platform. It seems like the link generated by zotxt cannot be recognized by Zotero iOS. However, links formatted like : zotero://select/library/items/XXXXXXXX is valid (you can jump to the expected item after click the link).

Infomation about the Zotero iOS link/url processing could be found here: https://github.com/zotero/zotero-ios/blob/5d0816061a5ed9849c82ac8ca087c4dc2ee489d2/Zotero/Controllers/CustomURLController.swift#L37

So I wonder what is the status of the link format upgrading plan?

zzeitt avatar Sep 15 '23 10:09 zzeitt