command line export to .bib file
Dear All,
I need to find out how to export zotero bibliography to a .bib file through command line.
The background to this need is this:
For those using latex, latexmk (http://www.phys.psu.edu/~collins/software/latexmk-jcc/) is a semi-boon for productivity. It has a continuous preview mode where it monitors source files on which final output depends and goes through commands required to produce updated output when any of the source files is updated.
It also allows you to add 'custom' dependencies and goes through user defined sequence of commands whenever a source file is changed. I want to customize the exporting of .sqlite file to .bib file whenever .sqlite file is changed. While writing something up, many a times I find that the bibliographic entry is something mixed up. I then go to zotero, correct the entry and then export it to bibtex. It would be nice if I can setup latexmk to do the exporting bit. If there is an export command for zotero, I could setup a chain of automatic update (zotero.sqlite -> myrefs.bib -> myarticle.pdf) and make work seamlessly with latex.
If this feature doesn't exist, please let me know if I can expect to see it in near future. I have basic scripting experience and may get things working if shown the way.
Thanks
Regards
Shalin
I need to find out how to export zotero bibliography to a .bib file through command line.
The background to this need is this:
For those using latex, latexmk (http://www.phys.psu.edu/~collins/software/latexmk-jcc/) is a semi-boon for productivity. It has a continuous preview mode where it monitors source files on which final output depends and goes through commands required to produce updated output when any of the source files is updated.
It also allows you to add 'custom' dependencies and goes through user defined sequence of commands whenever a source file is changed. I want to customize the exporting of .sqlite file to .bib file whenever .sqlite file is changed. While writing something up, many a times I find that the bibliographic entry is something mixed up. I then go to zotero, correct the entry and then export it to bibtex. It would be nice if I can setup latexmk to do the exporting bit. If there is an export command for zotero, I could setup a chain of automatic update (zotero.sqlite -> myrefs.bib -> myarticle.pdf) and make work seamlessly with latex.
If this feature doesn't exist, please let me know if I can expect to see it in near future. I have basic scripting experience and may get things working if shown the way.
Thanks
Regards
Shalin
An alternative implementation would be to export the bibtex file whenever something was added or edited. see http://dev.zotero.org/sample_plugin and http://groklab.org/wiki/index.php?title=Zotero_To_GROK_Codex for hints on how to do this.
Unfortunately, I have never written a javascript - so writing a plugin will be steep learning curve and I would like to avoid that :-)
Giving more thought and having used latexmk now for two full days, I realize that continuous update is not really that good an idea. Latexmk takes a while to compile the sources and make a pdf and it gets trigerred whenever any of the source files is modified. If I export new .bib file on every small change made to database, latexmk would be running continuously unnecessarily.
So I have now simplified the issue, I just need a keyboard shortcut to export the whole library to the bibtex file that I have determined initially. The solution would be to record a macro and assign to it a keyboard shortcut. When I am done editing entries in zotero, this single keystroke will allow me to update the final PDF (new .bib will trigger latexmk).
Is there a pluging for recording macros with zotero? If not, could I get a rough recipe on modifying hello world plugin to be able to create such a macro.
Thanks
Shalin
http://www.personal.psu.edu/jxf35/zoterotobibtex.html
The solution works very nicely.
http://www.curiousjason.com/zoterotobibtex.html