This is an old revision of the document!


Overview

In Zotero >= 2.0, translators are just javascript files. While Scaffold 2.0 can ease translator development, some prefer to work directly on the filesystem. To do this, one must

  1. find or create a Zotero development environment
  2. find or create a translator development environment
  3. create or modify a translator file
  4. edit, run, test, debug
  5. contribute your translator

Find or create a Zotero development environment

One develops a translator to run on/against a given version of Zotero, which runs on/against a given version of Firefox. The easiest way to do this is just to use the current version of Zotero that is running in your current Firefox profile. One can identify the path to one's current Zotero directory using the Zotero UI: select the gear icon to dropdown its menu, and choose Preferences>Advanced>Show Data Directory.

While convenient, using one's current Zotero

  • runs the risk of corrupting one's current Zotero data, i.e. one's saved citations.
  • does not allow one to develop against another version of Firefox or Zotero.

To create a separate Zotero development environment,

  1. Use Firefox's Profile Manager to create a Firefox profile. (Remember below to start Firefox using that profile.) (Note that, by default, only one Firefox profile can run at any given time.)
  2. install the desired version of Zotero into your Firefox profile. One can install either

Find or create a translator development environment

Zotero installs its translators and related code as files in the subdirectory translators. I.e.

  • if the path to your Firefox profile=
    ${FIREFOX_PROFILE}

    then the path to your Zotero is

    ${FIREFOX_PROFILE}/zotero
  • if the path to your Zotero=
    ${FIREFOX_PROFILE}/zotero

    then the path to your translators, and hence to your translator development environment, is

    ${FIREFOX_PROFILE}/zotero/translators

TODO: how to get alternate/uplevel versions of translators?

TODO: Javascript-enabled tools

Create or modify a translator file

Edit, run, test, debug

Enable debugging output

One must

  • configure Firefox to write Zotero debugging output to a terminal emulator (e.g. xterm, terminal, cmd)
  • start Firefox via command-line from a terminal emulator (i.e. not via an icon)

before one can see output from, e.g., Zotero.debug() calls. See detailed instructions for linux, mac, and windows.

Contribute your translator