Different collection IDs on different machines

I'm using a plugin (zotelo - https://github.com/vspinu/zotelo) to make it easier to keep a latex .bib file up to date; the problem, however, would apply to many external applications.

The problem is that the IDs returned by getCollections() are not the same in synced databases on different machines. Sync has been working completely fine, all content matches, but the internal SQLite database IDs (collections#CollectionID) just happen to be different.

This is presumably simply because things have been added / synced in varying orders on different machines. However it means that collection ID, as used in the API, doesn't reliably identify the same collection when used on the same synced database.

Any suggestions?
  • item and collection IDs are indeed not stable and will actually be phased out as far as I understand. You should be able to get to the collection key, though (it's something like 85HNANQ5), which is stable across syncs and unique within a user library (to make it globally unique you'd need to turn it into a URI)..
  • Thanks for the confirmation. Yes I saw the "key" column in the table and noted it had consistent unique entries. Is there any API (for Javascript, not web) to access this? All the functions e.g. getCollections(), Collections.get() appear to work with the non-stable IDs.
  • it is, but I don't know off hand. Try posting to zotero-dev https://groups.google.com/forum/#!forum/zotero-dev

    I thought better bibtex may have already solved this, so Emiliano might just know.
  • BBT has several ways to solve this. I usually use the built-in auto export, but the pull export should work; it accepts keys rather than IDs, and the keys are stable.
  • Thank you for the pointers. It looks like BBT and its webserver feature might be a better method through which to pull out Biblatex out of Zotero within Emacs. Communicating over HTTP looks neater than sending gobbets of Javascript to MozRepl. And it would solve the original problem with IDs.
  • If you right-click a collection, it will give you the BBT pull URL if you click "BibLaTeX URL"
Sign In or Register to comment.