How to write a Zotero translator

27 views
Skip to first unread message

Bryan Bishop

unread,
Jan 15, 2013, 12:43:45 PM1/15/13
to science-libe...@googlegroups.com, Bryan Bishop
Here's some documentation on writing a Zotero translator. These
translators are written in javascript and added to the
zotero/translators.git repository. When users in Firefox or Chrome, or
the standalone client, browse to an academic publisher's site, Zotero
uses the translators to extract metadata and a pdf. Sometimes these
translators break and need to be updated, or sometimes an academic
publisher's site is missing from the collection (it happens). Here's
some details on how to fix translators or contribute.

https://github.com/zotero/translators
git clone git://github.com/zotero/translators.git

Documentation on writing a translator:
http://www.zotero.org/support/dev/how_to_write_a_zotero_translator_plusplus

However, I highly recommend just using previous translators as a base.
The document looks like it complicates a lot of the process.

Scaffold helps ease the process of making Zotero translators:
http://www.zotero.org/support/dev/translators/scaffold

"Translators are stored as individual JavaScript files in the
“translators” subdirectory of the Zotero data directory. While
translators can be edited with any tool, Scaffold is a Firefox add-on
dedicated to writing Zotero translators, offering advantages such as
real-time testing and debugging."

https://github.com/zotero/scaffold
https://github.com/downloads/zotero/scaffold/scaffold-3.0.xpi
git clone git://github.com/zotero/scaffold.git

Automatic translator testing:
http://www.zotero.org/support/dev/translators/testing

.. you run tests by browsing to (in Firefox, I assume):
chrome://zotero/content/tools/testTranslators/testTranslators.html

You can use the translators headlessly like so:
https://github.com/zotero/translation-server
git clone git://github.com/zotero/translation-server.git

I use translation-server in an IRC bot called paperbot hanging out in
##hplusroadmap on freenode,
https://github.com/kanzure/paperbot

- Bryan
http://heybryan.org/
1 512 203 0507
Reply all
Reply to author
Forward
0 new messages