Is there any documentation for the Zotero standalone API, if such a
beast exists? I assume there is a way for Chrome & Safari to
communicate with Zotero standalone.
I ask because I am exploring the possibility of extending zotero-plain
[1] to support standalone.
best, Erik
I also have my eyes on this as a useful way of talking with desktop
Zotero. Unless some docs appear from the depths of CHNM, the place to
look is /zotero/chrome/content/zotero/xpcom/connector.js, which has
the details of the web server on the Zotero/Firefox/XULRunner side,
and /connector/common/global_common.js on the Connector side. It's
implemented as server running at http://127.0.0.1:23119/translate/
that accepts POST messages of JSON data. More information on the
messages and responses can be gleaned from these two files.
The interface doesn't expose much data-- it can only be used to get
Zotero to ingest various items at this time (although it could be
exploited to force-feed items to Zotero, if you send it page source
and the translator ID-- that could be useful).
I'd like to see the possibility to read items back out from this
interface, and more, so that we'd have a local read-write interface to
the Zotero library. But that may be simply too much work for now...
Avram
Hi Avram,
Thanks for the information. Yes, it would be great if Zotero supported
this feature (that is, read access). Even better would be if it used
the same API as zotero.org. But I am not prepared to write that at the
moment, so I guess we will have to wait.
best, Erik
Worth noting, however, that Sebaastian Mathôt's Gnotero[1] includes a
Python library, libzotero,[2] that makes reading from the library
relatively easy. Still not the same as the server API, but still
something. Maybe Sebaastian (or one of us) would be interested in
adding write support to libzotero through the Connector interface.
That would hopefully also include adding a JSON import translator to
Zotero itself that could read the JSON that is quickly becoming the
standard representation of Zotero items.
Avram
_1: http://www.cogsci.nl/software/gnotero
_2: http://www.cogsci.nl/blog/tutorials/97-writing-a-command-line-zotero-client-in-9-lines-of-code