Translations of this page:

Zotero Source Code

Note If you do not plan to make any code changes yourself, and only wish to run the latest prerelease versions of Zotero, you can just install a development XPI.

Licensing

Zotero code is available under the AGPLv3 license, except where the source code specifies otherwise.

Code Repositories

The Zotero project has two locations for hosting source code. For most code, see Zotero on GitHub.

Checkout URLs

Branches and Tags

Zotero's Git repositories often have multiple branches for different lines of development. The default branch, “master”, is the main development trunk where development is most active and where new features are first introduced. Because of this, trunk code is often unstable: new code has received little testing, which increases the risk of data loss. Branches are usually created prior to releasing new major versions. After a branch has been created, the branch becomes an independent line of development: the code in the branch remains relatively stable and mostly receives bug fixes and small changes. When a release is made (e.g., Zotero 2.1.10), a snapshot of the relevant branch or trunk is tagged with its version number. See Git documentation for more information on working with branches and tags.

Issue Tracking

Zotero previously used Trac as a source code browser and issue tracker, and old tickets are still archived there. Now that most Zotero development has moved to GitHub, new tickets will be created on GitHub in the relevant repositories, and changesets can be viewed using the GitHub web interface.

Zotero does not use an issue tracker for bug reports. Zotero users should use the Zotero Forums rather than GitHub to report issues and feature requests.

Git Repositories

Checking out the source code

To make code changes, you first need to create a local copy (a checkout) of the relevant code from the Zotero Git repository using a Git client.

After installing Git, you can use the official command-line client for checking out code, e.g.

git clone --recursive git://github.com/zotero/zotero.git zotero

checks out the Zotero client core code to a local “zotero” directory.

Mac and Ubuntu users may already have Git installed. Mac users can install the latest version via HomeBrew, MacPorts, or Fink), while Ubuntu users can install the git package.

Need more help?

See the GitHub documentation for assistance with checking out Git repositories.

Contributing patches

The preferred way to contribute code is to fork the Git repository, commit your changes, and send a pull request.

See Client Coding for more information on coding for Zotero.

Running Git installations

For testing, it is very convenient to run the Zotero client directly from a Git checkout.

Warning: Git installations are for development and testing purposes only. Do not use a Git installation with important data.

Zotero for Firefox Git installations

  1. In the extensions subdirectory of your Firefox profile directory, create a text file named zotero@chnm.gmu.edu (without an extension like ”.txt”) containing the path to your Git checkout (e.g. ~/Documents/Development/zotero). This tells Firefox to load the extension from this location. If Zotero is already installed, either use a separate profile (recommended) or uninstall it and restart Firefox before creating the text file.
  2. Start Firefox. If the extension loaded successfully, you should see “Zotero” in the bottom-right corner of the window.
  3. If Zotero did not load, open Tools → Web Developer → Error Console to debug. If your Firefox is not in English, you probably need to switch the language to en-US, as the other locales in Git may not have the latest strings.
  4. Update to the latest revision at any time with git pull.
  5. Optionally, to get the latest translators, default set of CSL styles, and CSL locales, run git submodule init and git submodule update.
  6. Restart Firefox to see the changes.

Zotero Standalone Git installation

After building Zotero Standalone, you can run it directly, or interact with it from a supported browser using a Zotero connector.

Google Chrome Connector Git installation

To run a Git build of the Google Chrome Connector, you need to:

  • Check out the Google Chrome Connector code
  • Run Zotero Standalone and the Google Chrome browser
  • Load the Connector extension in Chrome
    1. Browse to chrome://extensions/
    2. Expand the “Developer mode” bar
    3. Click the button “Load unpacked extension…”, and give the path to the local copy of the Connector extension code

You should now see a Zotero icon in the address bar when visiting translatable webpages (e.g this article or this book), and clicking the icon should add the item to your Zotero Standalone library.

dev/source_code.txt · Last modified: 2012/12/12 11:04 by tfmorris