Skip to content
This repository was archived by the owner on Apr 2, 2023. It is now read-only.

Developers

Rainer Simon edited this page Oct 21, 2012 · 31 revisions

Developers

Annotorious makes heavy use of the Google Closure Library underneath the hood. This might take a bit of getting used to if you haven't worked with Closure before. But other than that, Annotorious is just plain old JavaScript.

To get started quickly, I recommend using the plovr build tool. Plovr includes all necessary Closure library dependencies, and is packaged into the Annotorious source code project in the plovr folder. So there's no need for a separate download or installation. The only pre-requisite is that Java needs to be installed on your system.

Note: the version of plovr I included in this repository is the February 2012 release (plovr-4b3caf2b7d84.jar).

Hacking on Annotorious

In the project directory, run

java -jar plovr/plovr.jar serve standalone.json

This will serve the compiled JavaScript code (for the Annotorious standalone version) on an embedded server. Simply open index_standalone.html for a test page that uses it. Any change you make to the code will be effective immediately, as soon as you refresh the test page in your browser. If you want to hack on the OKFN Annotator plugin version of Annotorious, run

java -jar plovr/plovr.jar serve okfn_plugin.json 

and open the OKFN Plugin test page index_okfn.html in your browser.

Building Minified JavaScript

To build the minified JavaScript for Annotorious (standalone version), run

java -jar plovr/plovr.jar build standalone.json > annotorious.min.js

To build the minified JavaScript for the Annotorious OKFN Annotator plugin, run

java -jar plovr/plovr.jar build okfn_plugin.json > annotorious.okfn.js

Understanding the Code

Further information to help you find your way around the source code is available on these Wiki pages:

Clone this wiki locally