Programmatic way to extract citation key/citekey? #2978
Unanswered
ReaderGuy42
asked this question in
Q&A
Replies: 1 comment 9 replies
-
And by this you want the citation key of the selected item in Zotero? I could add behaviour to this JSON-RPC endpoint: https://retorque.re/zotero-better-bibtex/exporting/json-rpc/index.html#itemcitationkeyitem_keys so that you could call it wilth |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a script that copies quotations from Zotero to Obsidian, where each source has a note called
citekey.md
, e.g.Chiang2004What.md
For this I need to first get the citekey of the document I'm working on. So far I've been using
xdotool key ctrl+shift+c
to get the citekey, but this doesn't work reliably, especially for longer quotes.Is there another way to get the citekey from within a script? I'm using bash on a Linux PC, and very open to suggestions.
This is how I'm currently getting the citekey:
The first line is supposed to clear the clipboard because I was having frequent problems with the program instead using previously copied things as the citekey and then of course not finding a note with that name. But now it sometimes tries finding
.md
so I've increased thesleep
but I'm not sure if that's completely fixed the problem.Beta Was this translation helpful? Give feedback.
All reactions