Closed bwiernik closed 4 years ago
Would #1477 cover your needs? Sounds similar, but not necessarily the same.
I'm not really following what that is issue is about. I don't really know what the AUX scanner feature does.
The workflow I'm envisioning is being able to add citations to my Markdown document, then extract all of the citekeys at the end and use these to generate a .json file.
I could add a method to the JSON-RPC endpoint.
As to #1477, during a bibtex compilation, multiple files are created as part of the process, one of which has extension .aux
and it hold information about the references cited in the latex document. The aux scanner parses the aux file and populates a collection with it.
Oh, got it! Do you have a link to an example .aux
file?
If you don't have one, the #1477 workflow won't help you much; you'd know if you had one, because the latex compile litters the working directory with them.
Sample: output.aux
I rarely use TeX, mostly Markdown to HTML or DOCX. But I think I might be able to make a dummy aux file to fill this purpose.
No, don't do that, I'll get you an endpoint you can post a bunch of citekeys to.
:robot: this is your friendly neighborhood build bot announcing test build 5.2.21.6436 ("export endpoint")
Install in Zotero by downloading test build 5.2.21.6436, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
What's the API for the endpoint?
It's going to be
curl http://localhost:23119/better-bibtex/json-rpc -X POST -H "Content-Type: application/json" -H "Accept: application/json" --data-binary '{"jsonrpc": "2.0", "method": "items.export", "params": [[<list of citekeys>], "<format>"] }'
but it doesn't work yet. In format
you can specify either a name (better
at the start not necessary) to get one of the BBT formats, or a translator guid to get any one that's available at that moment in Zotero.
found the error. new build incoming.
:robot: this is your friendly neighborhood build bot announcing test build 5.2.21.6438 ("look up by citekey, not itemID, genius")
Install in Zotero by downloading test build 5.2.21.6438, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".
I'll roll it into a release. I think GH is still on the fritz -- I saw your email, but don't see the message here.
Actually, it's not working for me. I misspoke and deleted the message.
curl http://localhost:23119/better-bibtex/json-rpc -X POST -H "Content-Type: application/json" -H "Accept: application/json" --data-binary '{"jsonrpc": "2.0", "method": "items.export", "params": [["Bonachecompensationexpatriatesreview2006", "BeckerModelbasedmetaanalysis2009"], "json"] }'
Then it gets no response. Debug ID: XPY8ASZX-euc
Ah, nevermind. It works if I specify csljson
for the format, but not with just json
.
Thank you again!
My pleasure. I'll roll it into a release when I close a few issues I'm currently working on. I could have json
work too BTW, it's just a matter of filtering out csl
.
Just json
should work now too.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm using BBT with pandoc. I'd like to be able to add citations using citekeys, without having manually curate a collection to export the .bib or .json file at the end of the process.
Is it possible to generate a list an export file (BibLaTeX or CSL JSON) from a list of citekeys? If not, could a function be added for that, such as a button in the BBT Preferences and/or as a parameter passed to the CAYW interface?