Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open-pdf with citekey #2214

Open
daaaaaaaaaniel opened this issue Jul 19, 2022 · 6 comments
Open

open-pdf with citekey #2214

daaaaaaaaaniel opened this issue Jul 19, 2022 · 6 comments

Comments

@daaaaaaaaaniel
Copy link

BBT support log: PY2LLID2-euc

I've been testing different QuickCopy settings and noticed that Zotero select links can use BBT's citekeys rather than Zotero's regular inscrutable folder codes, ie. Zotero's select link (zotero://select/library/items/9PSKR4YM) and BBT's select link (zotero://select/items/@holt.etal2015_Wher) both point to the same item.

Zotero's syntax also supports links that point directly to specific pages in a PDF ie. zotero://open-pdf/library/items/9PSKR4YM?page=3. But unlike select links, as far as I can tell, BBT citekeys cannot be substituted for the folder code 9PSKR4YM in open-pdf links.

I want to avoid using Zotero's folder codes because they are not easily human-readable. My citekeys, on the other hand, are human readable and I would prefer to use them whenever possible.

Is there currently a way of constructing a link with citekeys to open a specific page of a PDF? And if not, could such a feature be implemented?

One complication I foresee is that since citekeys refer to items rather than attachments, there could be items with a single citekey and multiple attachments. In these cases, my suggestion is to include the filename of the attachment in the link (or enough letters of the filename) to perform disambiguation so that the link points to just one PDF out of all the attachments. Using the filename would keep the open-pdf link human readable. Here are some examples of how I imaging these links could possibly be structured:

zotero://open-pdf/items/@berry2015?page=12
zotero://open-pdf/items/@berry2015/Golumbia-2015---Judging-Like-a-Machine.pdf/?page=12
zotero://open-pdf/items/@berry2015/Golumbia-2015---Judging-Like-a-Machine.pdf/12
zotero://open-pdf/items/@berry2015/Golumbia/12
zotero://open-pdf/items/Golumbia-2015---Judging-Like-a-Machine.pdf/12
@retorquere
Copy link
Owner

I'm awaiting a planned change to make things like this possible.

@stefangstark
Copy link

Is this still planned? It would be great to sync my links to pdfs from eg obsidian notes on both desktop and mobile.

@FeralFlora
Copy link

Is this still planned? It would be great to sync my links to pdfs from eg obsidian notes on both desktop and mobile.

Regular Zotero links work with the mobiles apps, though.

@stefangstark
Copy link

I want to auto-generate links to the pdf. Obsidian (or whatever) can easily see the citekey, but not the internal zotero folder name and open-pdf relies on this folder name. So basically select/items links can work but not open-pdf

@retorquere
Copy link
Owner

I'm still awaiting the change by the zotero team.

@FeralFlora
Copy link

So basically select/items links can work but not open-pdf

If by "can work but not open-pdf" you are referring to whether they work on mobile or not, then that's not correct. If you are referring to whether open-pdf links work with citekeys, then yeah, that's what this request is for.

If you meant to former, I assume that you've taken a select link, and changed select to open-pdf? That's not possible, you need the item key of the attachment itself, not the parent item (which is what the select link contains).

Don't get me wrong, I'm not saying that the current request is not valuable, just clarifying that you can definitely use open-pdf links generated in Zotero and pasted into Obsidian on desktop and mobile, and they will open the PDF in Zotero on both platforms. So what you mention about wanting to sync open-pdf links shouldn't be an issue.

Try using this script for the Actions & Tags addon for Zotero to copy the open-pdf link (right clicking on the attachment when copying), and paste it into Obsidian: windingwind/zotero-actions-tags#115 (comment)

You can also grab the open-pdf link inside Obsidian using the Zotero Integration plugin with the {{attachments[0].pdfURI}} variable.


I want to auto-generate links to the pdf. Obsidian (or whatever) can easily see the citekey, but not the internal zotero folder name and open-pdf relies on this folder name.

Can you clarify how Obsidian can easily see the citekey in ways that do not apply to the item key? I mean, both are generated and stored in Zotero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants