AutoZotBib: Automatically-updating BibTeX export from Zotero

Hi all,

I've just released a new plugin for Zotero called AutoZotBib, available from http://rtwilson.com/academic/autozotbib

It's a fairly simple, but I hope very useful, plugin which will keep a specified BibTeX file in sync with your Zotero Library. That is, whenever you add, remove or update anything in Zotero, the specified BibTeX file will automatically be updated with your changes. This allows you to set your LaTeX documents to use this file, and never think about exporting again - as all changes will automatically appear in the file, ready to use in \cite commands.

The plugin is available to download at the link above, and there is a full installation and usage guide there.

I'd be interested in any feedback that the community has: both in terms of the usefulness of the extension or the quality of the code (which is available from GitHub via the above link). If there are any additions you'd like to see then let me know - this is definitely a first version and I know it can be improved!

Also, a quick note to the admins: would it be possible to get AutoZotBib listed on the plugins page (http://www.zotero.org/support/plugins)?

Cheers,

Robin
«1
  • cool. I'll get to this eventually, but you can also just get an account and edit the plugin page yourself:
    http://www.zotero.org/support/dev/documentation
  • This is what I just wished for a few days ago at spartanroc's Improving bibtex topic in the forum:) Thanks a lot for doing this, I have nstalled it and trying right away,

    Best wishes,
    emrea
  • I'm glad that somebody is going forward on this issue. But an important feature of my original bibtex export tool is missing in this plugin. That is the export of the local path of attachments for cooperating with other applications. Unfortunately I don't see an easy way to implement it in this plugin.

    Another weak point is the setting of preferences has to be done in the bibtex js file. So you have to manually change back to your own settings each time when you update. This can be relatively easily solved by defining preferences in this plugin.

    See detailed discussions on my bibtex export tool on the forum:
    http://forums.zotero.org/discussion/17847/improving-bibtex-export/

    and zotero-dev:
    http://groups.google.com/group/zotero-dev/browse_thread/thread/53d7c67357f74cef/26c751f6f0108e07
  • edited April 14, 2012
    Hi!
    Thanks for the great plugin, Robin. However, it seems to be very slow on my database. I have about 1500 references, and every time something changes, Zotero freezes for about 30 seconds (if the plugin is enabled). It's not fatal, but I wonder if there a fix for this problem?
  • Agreed. Any update in my medium sized database (1000 references) takes 5-10 seconds to update, often slowing things down even if I click the next field in a reference I am updating. Perhaps a button (with everything preset) to update would be better? Sadly turned it off for now bc. the wait lag was not workable.
  • Hello, and thank you very much for AutozotBib, which is really fantastically useful !

    I just repost a question I had previously written in a wrong place :

    I'm using AutoZotBib on my Zotero 3.0.11 addon for firefox, and I recently noticed a very annoying problem with the manual export. I cannot find for which reason it does not export some of my recent library items, so when I compile my xelatex file (in Kile) it gives me undefined references (whereas the old ones work fine and appear in the bibliography).

    When I compile my file with biber, it gives me a series of warnings like that "file tmp/...bibliocomplete.bib~, line..., warning: 1 character of junk seen at toplevel" and then the list of references it couldn't find "I didn't find a database entry for + the key I entered in my tex file".

    I checked some of the errors "character of junk" but I can't find a unifying reason for them (sometimes in the key I have characters like ??? or - but sometimes not). And I looked for the items : they are not in my bibtex file, whereas they are in Zotero.

    I wonder whether my bibliography is too big and cannot export to Bibtex ? (It would be very sad). Firefox tells me every time I export manually "un script est en attente sur cette page. Voulez-vous le laisser continuer...?" and I always answer "yes" (until I recently told firefox not to dispay the message again because it was annoying).

    I also wonder whether the problem may be linked to my recent upgrade to Ubuntu 12.10 or to the fact I recently disabled all the firefox plugins due to a problem of translators in Zotero, and then enabled them again (I'm studying every possibility because I really have no idea !).

    I have LyZ installed to, not because I use LyX, but because I remembered vaguely that I installed it at first (before AutoZotBib) because it translated the key in a user-friendly way (like radke1965 or buecheler1881-1), but in fact I'm not sure that it is necessary for me (does AutoZotBib change the key also ?), and I hope there is no conflict between the two.

    Thank you very much for any help,

    Julie
  • Well, I answer to my own question : it was a problem of file directory because I recently moved my .bib file (unfortunately, though, there was no error message about the place of the file when manually exporting). Really sorry.
  • In my case, biber was complaining about the commas (1 character of junk) between entries in the .bib files.
  • does anyone know if the comma between entries is there for a reason?
    It's not common in bibtex files and it's trivial to remove, yet it has been written in the translator very deliberately, so I'd like to know why before removing it.
  • Not sure why the comma is there. I'd imagine removing it is fine, but note that it is valid BibTeX & biber should work whether it is there or not. Any warnings it emits should not impact functionality.
  • Hello,
    Using Lyx for years and loving zotero, this plugin is THE piece I was missing. Thank you very much!!
    There is only one point I regret: the file ZotOutput.bib comes with "é" "à"... things that bibtex doesn't really love... If somebody has a idea it would be great.
    (Some code lines like "if there "é" then put "\'e" and so on ???)
  • Zotero's bibtex export can escape accented (and many other) characters if you set the export charset to ISO 8859 (try manually exporting items-
    In the "Export" tab of the preferences, check "Display Charset options on export" then try manually exporting some items to bibtex and chose ISO as the charset.

    I don't know of the top of my head how to do that for autoZotBib, though.

    Also, if you're working with LyX, are you aware of the LyZ plugin, which, IMHO, adds another layer of convenience?
    https://addons.mozilla.org/en-us/firefox/addon/lyz/
  • The upgrade of Zotero standalone has turned off Autozotbib with a message that it is incompatible with Zotero 4.0.3. Are there any tricks to get Autozotbib working with the new version of Zotero?
  • edited April 10, 2013
    AutoZotBib is actually compatible, but the max versions need to be increased. I've asked Robin, the developer to do that, but in the meantime I've uploaded a tweaked version
    https://github.com/adam3smith/zotero-tools/raw/master/autozotbib.xpi
    You can download it and then use "Install from file" from tools --> add-ons in Firefox/Zotero Standalone. This should work.

    (In general you shouldn't install xpis if you don't trust the author - all I did was to increase the max versions in install.rdf - you can do that yourself if you want).



    see below.
  • The official version is now updated, install from:
    http://www.rtwilson.com/academic/autozotbib
  • Thanks for the quick update.
  • Hi,
    I'm wondering if you can solve this.
    The export works very well if :
    C:\Data\melanie\Dropbox\Labo\Documents\jabref\zotero.bib
    but nothing happens if
    C:\Data\melanie\Dropbox\Labo\Documents\jabref\baseDonnéesBibTex\zotero.bib

    The problem is the "é". I try different folder names, and any kind of éàè.. doesn't work. Space are ok.

    Thanks
    Mélanie

    PS Found this on WinXP system, I could try at home on Ubuntu to see if it's the same.
  • Thank you for this plugin!
    I would be very interested in a sync-option in the opposite direction. I'm mainly using bibtex and it would be great if zotero could be synced from a bibtex file.

    Thanks
    Stephan
  • Thanks very much! Great add-on for firefox!

    My only problem on Linux Mint 14, Zotero 4.0.12, Firefox 23.0, autozotbib 0.51 is that BibTeX_RobinTan.js doesn't work - nothing happens. Works fine when I swap back to the original BibTeX.js in same directory which makes me think its installed OK

    Anyone have a similar problem?

    Thanks
    Peter
  • Please add the ability to automatically export just one folder from Zotero, rather than the whole library. I generally make one folder for each project.
  • your aware that you can just right-click on a collection and select "export collection" yes? It's three clicks instead of one, but still...
  • Yes I know that. But I want to automate it. Watch the folder for changes and update the bibtex file accordingly.
    That is the point of this plugin, right?
  • +1 for tariq's request
  • The autoexporting add-on can do this:
    http://rokdd.de/b/zotero-autoexport
    works quite similar to auto-zotBib otherwise.
  • robintw, thanks for creating a very useful extension. I have just disabled the automatic updating though, as it caused my system to hang (mac yosemite 10.10.2 running standalone zotero 4.0.26.2 with autozotbib 0.51). My database is quite large.
    The spinning mac beach ball appears shortly after web sync begins, and zotero becomes unresponsive. I submitted an error report (actually maybe more than one, sorry) with ID 8202270.
  • that's to be expected the way the add-on works. Your best bet for auto-updating are the pull updates in better bibtex:
    https://github.com/ZotPlus/zotero-better-bibtex/
  • Thanks for the fast response! I'll try that this evening.
  • I'm in the final stages of implementing an auto-export built into BBT. This will only work with BBT as it hooks into BBTs caching mechanism to keep performance acceptable, but I'm seeing order-of-magnitude (or more, on a fast system) speedups where it hits the cache, so I'm very hopeful. The exports can also be set to trigger when the PC is idle, so it should in fact not hurt performance at all in that case.
  • Auto-export is now shipping. Documentation still needs work, somewhere during the next week.
  • Emiliano, thank you for this great feature. I was looking for some shortcuts to streamline my thesis writing and it works well! Will there be the possibility to keep a whole library updated instead of a collection only? Anyway, it's not a real issue working with a collection.
Sign In or Register to comment.