No description, website, or topics provided.
JavaScript HTML Python CSS Java Puppet
Latest commit 1098dc6 Jan 9, 2017 @balaitous balaitous committed on GitHub Update
Failed to load latest commit information.
deploy Work on travis build. Jan 10, 2015
dev add forgotten file and correct .gitignore Jan 8, 2015
src update tracking site. Feb 16, 2015
test-suite Make the dev Vagrant virtual box and the test suite (using the dev vm… Jan 7, 2015
.gitignore Preparing 2.6 release. Jul 22, 2015
.gitmodules Make the dev Vagrant virtual box and the test suite (using the dev vm… Jan 7, 2015
.project import from internal svn r 4007 Nov 23, 2009
.travis.yml python-magic form pypi is not th same as from apt. Jan 11, 2015
ABOUT.rst Update again blurb. Jul 22, 2015 Work on legalese. Dec 22, 2014
LICENSE.txt Work on legalese. Dec 22, 2014 Preparing 2.6 release. Jul 22, 2015
Makefile Preparing 2.6 release. Jul 22, 2015 Update Jan 9, 2017 Cleanup. Jul 22, 2015
Vagrantfile Travis build. Jan 11, 2015 import from internal svn r 4007 Nov 23, 2009 Work on vagrant config. Jan 5, 2015
buildout.cfg Pin down djangorecipe version. Feb 6, 2016
requirements.txt Use scm tags for versions. Feb 6, 2016 Replace DISABLE_TRACKING and TRACKING_HTML by a TRACKING_ID variable … May 6, 2014 Use git tag for package version. Feb 6, 2016 import from internal svn r 4007 Nov 23, 2009

Comt, free software Web-based text annotation platform


Comt is a free software Web-based text annotation platform.

More info (and a hosted platform) at:

Note about this version

This is version 2.6, the last one of the 2.x branch.

If you're interested in the project, either as a user or a potential contributor, we recommend you try the upcoming 3.0 releases.


If you're busy,

  1. Install the following packages (on a Debian or Ubuntu Linux distibution):

    sudo apt-get install -y git-core python-dev g++ libtidy-dev pandoc libpq-dev

Note 1: you can probably find similar packages on other Linux distributions, then proceed.

Note 2: at this point we don't have a straightforward recipe to install comt Mac OS or Windows.

  1. Not run:

    git clone cd comt python bin/buildout -v

  2. Then create your database (see below) and create/edit the file accordingly.

  3. Then run:

    bin/django syncdb --settings=settings bin/django migrate --settings=settings bin/django loaddata roles_generic --settings=settings bin/django runserver --settings=settings

  4. Now you can point your browser to http://localhost:8000/



CC-BY ( for translation files



  • Postgresql 8.3 or Mysql 5+ or sqlite
  • Python 2.5+
  • Abiword or Openoffice 3.0+ (headless)
  • Pandoc


  • python
  • python magic
  • python development headers
  • python setuptools
  • python pexpect
  • python cssutils
  • pandoc
  • abiword (or headless openoffice and python uno)
  • git
  • libyaml

(all other python dependencies will be downloaded by buildout)

Installation (development install)

These are old installation notes, they still need to be updated.

  1. Install python2.5+ and all required libraries

    (ubuntu users, run: sudo apt-get install python python-magic python-setuptools python-uno libyaml-0-1 python-yaml python-dev git-core python-utidylib python-pexpect python-cssutils)

  2. Install pandoc

    (ubuntu users: sudo apt-get install pandoc)

  3. Install abiword

(ubuntu users: sudo apt-get install abiword)

Alternatively, install openoffice (headless mode) (used for document conversion)

(ubuntu users: sudo apt-get install sun-java6-jre xvfb)

  1. Install/configure database (skip this step if you plan to use a sqlite database)

4 a) Postgresql

- Install and configure database server [skip this step if use an external database server]
  (ubuntu users : `sudo apt-get install postgresql`)

- Install database client
  (ubuntu users : `sudo apt-get install postgresql-client`)

- Install python database connector: psycopg2
  (ubuntu users : `sudo apt-get install python-psycopg2`)

4 b) Mysql

- Install and configure mysql server [skip this step if use an external database server]
   (ubuntu users : `sudo apt-get install mysql-server`)

- Install database client
  (ubuntu users : `sudo apt-get install mysql-client`)

- Install python database connector: mysqldb
  (ubuntu users : `sudo apt-get install python-mysqldb`)
  1. Create a database (we recommend UTF8 encoding) and a read/write access to it. (skip this step if you plan to use a sqlite database)

    The database account accessing the database MUST have administrative privileges when running the 'syncdb command' (step 8) (The reason for that is that Postgresql requires such privileges to create the C-based stored procedure that we use for full text indexing) (ex. postgresql: 'sudo -u postgres createdb -E utf8 -e <db_name>)

  2. Setup the project and get dependencies

  • python
  • ./bin/buildout
  1. Configure Comt to your settings
  • copy to (this file will contain your personal settings)
  • edit to suit your settings (search for YOUR_SETTINGS occurrences, those are mandatory settings)
  1. Create the database structure (and test your database connection)

    • ./bin/django syncdb --settings=settings
    • ./bin/django migrate --settings=settings
  2. Create basic right management system

    • ./bin/django loaddata roles_generic --settings=settings
  3. Launch development server

  • ./bin/django runserver --settings=settings
  1. Access your Comt instance by pointing your browser to

Installation (Vagrant development box)

The second option is to use the vagrant virtual machine defined in the dev folder.

For this you need first to install Vagrant for your platform (cf., open a terminal in the dev folder and launch the command

vagrant up

This will create a virtual box, using the private address An instance of comt can be reached at the following url

The provisioning tool used is Puppet and the manifest (cf dev/manifests/site.pp) uses some external modules (c.f. dev/modules/ except dev/modules/sysconfig). These modules are referenced as git submodules. Therefore you mus ensure that all the submodules have been cloned also. There are two ways to make this:

  • pass the --recursive option to git clone when cloning the Co-ment repository : $ git clone --recursive

  • or on an existing cloned repository : $ git submodule init && git submodule install

The installation has the following parameters:

  • The root of the project is mapped on /srv/comt on the dev box.
  • The web server is nginx (
  • The web pages are served as a wsgi application with gunicorn (
  • The gunicorn processes are monitored by supervisor (
  • Openoffice is installed but is not launched as an headless instance (althought it could be easily setup with supervisor).
  • The dev box uses a virtual network with the ip (this can be changed in the Vagrant config).
  • The box is provisioned using puppet (>).
  • Most of the configuration is done in the sysconfig module found in dev/modules/sysconfig.
  • All the other subdirectories of dev/modules are puppet modules used during the box provisioning. All the folders are sub-repositories and are checked-out using git.

Moreover, the following parameters are set :

var name default
db_name coment
db_user coment_user
db_pw coment
db_port 5432
superuser_name admin
superuser_pw dev@co-ment

These values can be overriden by creating a custom.yaml file in the dev folder. The file custom.yaml.tmpl gives a template for the format of this file.

If the db_host is empty or 'localhost', or '', the database is considered local to the box and a postgresql server is installed in the virtual server.

Otherwise, the server is considered remote and only the postgresql client libraries are installed on the dev box.

Also in this case, the database (db_name) and user (db_user) are not created automatically.

You must ensure that they are already created on the postgresql server with the adequate authorizations, and that the user can connect on the 'remote' server from the dev box.

The creation of the virtual machine will create some files in your source tree (buildout-dev.cfg, test-suite/start-test-suite-dev.js,...). These files are necessary to the correct operation of the dev virtual machine and should not be touched. They are generated by Puppet during the provisioning of the Vagrant box. If they need to be adapted you will find them in the sysconfig puppet module.

Please note that they should not be added to the versioning tool (git) and are currently already ignored.

After you are done with the virtual machine (or if you need to start afresh) they can be cleaned by launching the script. Please note that except the files directly managed by Vagrant,the script clean all trace of the virtual machine in the source tree, including the buildout bin and egg folders.

Please refer to the available online documentation for more details on the various tools used here.

Installation (production environment)

This README does not cover in details a production environment because this kind of setup is too platform dependant for us to provide a guide.

A few tips thought:

  • The recommended way to install it is using apache and wsgi, check out django installation guide at

  • If you use apache as a frontend, you will need to create {{ APACHE_HOME: usually /var/www }}/.python-eggs and chown it to the apache user.


Normal upgrade

Upgrading you database should only need one command:

  • bin/buildout
  • bin/django migrate --settings=settings

Upgrade from alpha releases

If your database was created using comt alpha prior to the revision 29, here are the commands you should run:

  • bin/buildout
  • bin/django syncdb
  • bin/django migrate cm 0001_initial --fake
  • bin/django migrate

Abiword or Openoffice ?

Comt uses either abiword or openoffice to convert documents from ODT, MS Word, etc. to html.

Abiword is a lighter and more performant solution. You have to add the configuration parameter USE_ABI = True in your to use Abiword. Otherwise openoffice is used.

To use openoffice, on a development setup, you should make sure no openoffice process is left and launch soffice -headless "-accept=socket,port=2002;urp;" to start openoffice in background mode.

Libraries and assets COMT depends upon

Javascript libs used (and license) / shipped with the distribution

Python libraries used (and license) / NOT shipped with the distribution


Icons derived from FatCow Icon Set ( (Creative Commons Attribution 3.0 License)


Q1: How can I check the distribution for errors (libraries etc.):

R1: After configuring a database and access in your, you can launch the unit test suite with the following command: ./bin/django test cm

Q2: I'm getting the following error when launching the migrate command: line 62, in handle __import__(app_name + '.management', {}, {}, ['']) File "/usr/lib/python2.5/site-packages/", line 300, in _uno_import raise ImportError( "type "+ name + "." +x + " is unknown" ) ImportError: type is unknown

R2: This is due to a bug in uno (python openoffice bridge) that monkey patches the import system and messes with django's dynamic module loading system. A workaround to launch the migrate command is to set: UNO_IMPORT = False in file src/cm/converters/ and then to launch the migrate command. Set the value back to True and relaunch the server to use openoffice as a conversion backend.

Q3: When using co-ment Drupal module, I want that the name of commentators to be the same as the Drupal username

R3: For this feature (commentator name = drupal login name) to be available, a configuration parameter should be set in DECORATED_CREATORS = True

Q4: I get 'import error' when starting the server (step #9)

R4: Make sure you installed all required python dependencies


The Comt web site is the place to ask questions, report bugs, check out the source code or download the releases of Comt.

How to contribute

We use GitHub as our collaboration tool.

Reporting issues

Please use the GitHub issue tracker for the project: <>

Contribute using Git

We use Git as our source code management system.

You can submit pull request


Update all po files


cd src/cm
../../bin/django makemessages -a
../../bin/django makemessages -d djangojs -a

Compile po files


cd src/cm
../../bin/django compilemessages

Create new file for lang 'LG'


cd src/cm
../../bin/django makemessages -l LG -e .html,.txt
../../bin/django makemessages -d djangojs -l LG