| author | gibus |
| Tue, 11 Feb 2014 13:45:32 +0100 | |
| changeset 573 | d36895174216 |
| parent 454 | b7a092a52eae |
| child 588 | 8e9ea314e06e |
| permissions | -rw-r--r-- |
| 0 | 1 |
******* |
2 |
Comt |
|
3 |
******* |
|
4 |
||
5 |
Presentation |
|
6 |
============ |
|
| 343 | 7 |
Comt is an free software Web-based text annotation platform. |
| 0 | 8 |
|
9 |
License |
|
10 |
======= |
|
11 |
GNU AFFERO GENERAL PUBLIC LICENSE |
|
12 |
http://www.gnu.org/licenses/agpl.html |
|
|
100
3dc863be86eb
added CC license for translations
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
94
diff
changeset
|
13 |
for software files |
|
3dc863be86eb
added CC license for translations
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
94
diff
changeset
|
14 |
|
|
3dc863be86eb
added CC license for translations
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
94
diff
changeset
|
15 |
CC-BY |
|
3dc863be86eb
added CC license for translations
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
94
diff
changeset
|
16 |
http://creativecommons.org/licenses/by/3.0/ |
|
3dc863be86eb
added CC license for translations
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
94
diff
changeset
|
17 |
for translation files |
| 0 | 18 |
|
19 |
Dependencies |
|
20 |
============ |
|
21 |
||
22 |
Environment |
|
23 |
------------- |
|
| 37 | 24 |
- Postgresql 8.3 or Mysql 5+ or sqlite |
| 0 | 25 |
- Python 2.5+ |
|
360
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
26 |
- Abiword or Openoffice 3.0+ (headless) |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
27 |
- Pandoc |
| 0 | 28 |
|
29 |
||
30 |
Requirements |
|
31 |
------------ |
|
| 36 | 32 |
- python |
33 |
- python magic |
|
34 |
- python development headers |
|
35 |
- python setuptools |
|
| 362 | 36 |
- python pexpect |
| 454 | 37 |
- python cssutils |
| 0 | 38 |
- pandoc |
|
360
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
39 |
- abiword (or headless openoffice and python uno) |
| 36 | 40 |
- git |
41 |
- libyaml |
|
| 0 | 42 |
(all other python dependencies will be downloaded by buildout) |
43 |
||
44 |
Installation (development install) |
|
45 |
============ |
|
| 31 | 46 |
1. Install python2.5+ and all required libraries |
| 454 | 47 |
(ubuntu users : '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') |
| 0 | 48 |
2. Install pandoc |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
49 |
(ubuntu users : 'sudo apt-get install pandoc') |
|
360
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
50 |
3. Install abiword |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
51 |
(ubuntu users: 'sudo apt-get install abiword') |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
52 |
Alternatively, install openoffice (headless mode) [used for document conversion] |
| 208 | 53 |
(ubuntu users : 'sudo apt-get install sun-java6-jre openoffice.org openoffice.org-headless xvfb') |
| 0 | 54 |
4. Install/configure database [skip this step if you plan to use a sqlite database] |
55 |
4 a) Postgresql |
|
56 |
- Install and configure database server [skip this step if use an external database server] |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
57 |
(ubuntu users : 'sudo apt-get install postgresql') |
| 0 | 58 |
- Install database client |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
59 |
(ubuntu users : 'sudo apt-get install postgresql-client') |
| 0 | 60 |
- Install python database connector: psycopg2 |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
61 |
(ubuntu users : 'sudo apt-get install python-psycopg2') |
| 0 | 62 |
4 b) Mysql |
63 |
- Install and configure mysql server [skip this step if use an external database server] |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
64 |
(ubuntu users : 'sudo apt-get install mysql-server') |
| 0 | 65 |
- Install database client |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
66 |
(ubuntu users : 'sudo apt-get install mysql-client') |
| 0 | 67 |
- Install python database connector: mysqldb |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
68 |
(ubuntu users : 'sudo apt-get install python-mysqldb') |
| 0 | 69 |
5. 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] |
70 |
The database account accessing the database MUST have administrative privileges when running the 'syncdb command' (step 8) |
|
71 |
(The reason for that is that Postgresql requires such privileges to create the C-based stored procedure that we use for full text indexing) |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
72 |
(ex. postgresql: 'sudo -u postgres createdb -E utf8 -e <db_name>) |
|
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
73 |
6. Setup the project and get dependencies |
| 0 | 74 |
- `python bootstrap.py` |
75 |
- `./bin/buildout` |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
76 |
7. Configure Comt to your settings |
| 0 | 77 |
- copy settings_local_sample.py to settings_local.py (this file will contain your personal settings) |
78 |
- edit settings_local.py to suit your settings (search for 'YOUR_SETTINGS' occurrences, those are mandatory settings) |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
79 |
8. Create the database structure (and test your database connection) |
| 0 | 80 |
- `./bin/django syncdb --settings=settings` |
| 31 | 81 |
- `./bin/django migrate --settings=settings` |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
82 |
9. Create basic right management system |
| 0 | 83 |
- `./bin/django loaddata roles_generic --settings=settings` |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
84 |
10. Launch development server |
|
17
a4be0b8a905d
bug fix : can view own comment on comment add on mod priori
reno
parents:
0
diff
changeset
|
85 |
- `./bin/django runserver --settings=settings` |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
86 |
11. Access your Comt instance by pointing your browser to http://127.0.0.1:8000/ |
| 0 | 87 |
|
88 |
Installation (production environment) |
|
89 |
============= |
|
| 212 | 90 |
This README.txt does not cover in details a production environment because this kind of setup is too platform dependant for us to provide a guide. |
91 |
A few tips thought: |
|
92 |
- recommended way to install it is using apache and wsgi, check out django installation guide at http://www.djangoproject.com/documentation/modpython/ |
|
93 |
- if you use apache as a frontend, you will need to create {{ APACHE_HOME: usually /var/www }}/.python-eggs and chown it to apache
|
|
| 0 | 94 |
|
| 31 | 95 |
Upgrade |
96 |
======= |
|
97 |
||
98 |
Normal upgrade |
|
99 |
-------------- |
|
100 |
Upgrading you database should only need one command: |
|
| 33 | 101 |
- `./bin/buildout` |
| 31 | 102 |
- `./bin/django migrate --settings=settings` |
103 |
||
104 |
Upgrade from alpha releases |
|
105 |
---------------------------- |
|
106 |
If your database was created using comt alpha prior to the revision 29, here are the commands you should run: |
|
| 33 | 107 |
- `./bin/buildout` |
108 |
- `./bin/django syncdb` |
|
109 |
- `./bin/django migrate cm 0001_initial --fake` |
|
110 |
- `./bin/django migrate` |
|
| 31 | 111 |
|
|
360
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
112 |
Abiword or Openoffice |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
113 |
===================== |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
114 |
Comt uses either abiword or openoffice to convert documents from ODT, MS Word, etc. to html. |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
115 |
Abiword is a lighter and more performant solution. You have to add the configuration parameter `USE_ABI = True` in your settings_local.py to use Abiword. Otherwise openoffice is used. |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
116 |
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. |
| 0 | 117 |
|
118 |
Comt uses |
|
119 |
============ |
|
120 |
||
121 |
Javascript libs used (and license) / shipped with the distribution |
|
122 |
------------------------------------------------------------------ |
|
123 |
- Yahoo UI http://developer.yahoo.com/yui/ BSD License |
|
124 |
- JQuery http://jquery.com/ MIT |
|
125 |
- markItUp http://markitup.jaysalvat.com/home/ MIT/GPL |
|
126 |
||
127 |
Python libraries used (and license) / NOT shipped with the distribution |
|
128 |
----------------------------------------------------------------------- |
|
129 |
- django http://www.djangoproject.com/ BSD License |
|
130 |
- python magic http://hupp.org/adam/hg/python-magic permissive BSD style license |
|
131 |
- Beautiful soup http://www.crummy.com/software/BeautifulSoup/ PSF license |
|
132 |
- python-chardet http://chardet.feedparser.org/ LGPL |
|
133 |
- python-feedparser http://feedparser.org/ "Permissive" custom license |
|
134 |
- python-imaging http://www.pythonware.com/products/pil/ http://www.pythonware.com/products/pil/license.htm |
|
135 |
- python-pytz |
|
136 |
- html5lib |
|
137 |
- python-simplejson |
|
138 |
- python-uno |
|
139 |
- python-utidylib |
|
140 |
- python-yaml |
|
| 454 | 141 |
- python-pexpect |
142 |
- python-cssutils |
|
| 0 | 143 |
|
144 |
Icons |
|
145 |
----- |
|
146 |
- Icons derived from FatCow Icon Set http://www.fatcow.com/free-icons/index.bml (Creative Commons Attribution 3.0 License) |
|
147 |
||
148 |
FAQ |
|
149 |
==== |
|
|
360
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
150 |
Q1: How can I check the distribution for errors (libraries etc.): |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
151 |
R1: After configuring a database and access in your settings_local.py, you can launch the unit test suite with the following command: `./bin/django test cm` |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
152 |
|
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
153 |
Q2: I'm getting the following error when launching the migrate command: |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
154 |
` |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
155 |
line 62, in handle |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
156 |
__import__(app_name + '.management', {}, {}, [''])
|
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
157 |
File "/usr/lib/python2.5/site-packages/uno.py", line 300, in _uno_import |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
158 |
raise ImportError( "type "+ name + "." +x + " is unknown" ) |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
159 |
ImportError: type django.contrib.sessions.management. is unknown |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
160 |
` |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
161 |
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/oo_converters.py and then to launch the migrate command. Set the value back to True and relaunch the server to use openoffice as a conversion backend. |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
162 |
|
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
163 |
Q3: When using co-ment Drupal module, I want that the name of commentators to be the same as the Drupal username |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
164 |
R3: For this feature (commentator name = drupal login name) to be available, a configuration parameter should be set in settings_local.py: `DECORATED_CREATORS = True` |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
165 |
|
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
166 |
Q4: I get 'import error' when starting the server (step #9) |
|
bfaab8740995
Add abiword as an alternative to open office for conversions
gibus
parents:
343
diff
changeset
|
167 |
R4: Make sure you installed all required python dependencies |
| 0 | 168 |
|
169 |
Community |
|
170 |
========= |
|
171 |
The Comt web site http://www.co-ment.org is the place to ask questions, report bugs, check out the source code or download the releases of Comt. |
|
172 |
||
| 85 | 173 |
How to contribute |
174 |
================= |
|
| 86 | 175 |
|
176 |
Contribute using mercurial |
|
177 |
-------------------------- |
|
| 85 | 178 |
We use mercurial as our source code management system. |
179 |
||
180 |
1. Create a mercurial profile (nickname/email) in ~/.hgrc (cf. http://mercurial.selenic.com/quickstart for more info). |
|
181 |
This is important because your name will appear in your changeset once it gets accepted into the mainline |
|
182 |
2. Clone the repository `hg clone http://hg.co-ment.org/ comt` |
|
183 |
OR update your copy of the source code: `hg update` |
|
184 |
3. Hack, hack |
|
185 |
4. Commit locally: `hg commit -m "MY COMMIT MESSAGE"` |
|
186 |
5. Export your changeset to a file: `hg export tip > my_patch.txt` |
|
187 |
6. Create a ticket describing your change and attach your patch to it: http://www.co-ment.org/newticket |
|
|
101
d8055f2280e8
additional info contrib and licenses
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
100
diff
changeset
|
188 |
7. We will review the patch as soon as possible. If we judge it acceptable and useful, we will be back to you regarding copyright, licensing and other legalese. |
| 85 | 189 |
|
| 86 | 190 |
Contribute without using mercurial |
191 |
---------------------------------- |
|
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
192 |
If you don't want to use mercurial, you can also create a ticket (http://www.co-ment.org/newticket) with a few modified files to the bugtracker. |
|
101
d8055f2280e8
additional info contrib and licenses
Philippe Aigrain <philippe.aigrain@sopinspace.com>
parents:
100
diff
changeset
|
193 |
Make sure you leave us a nickname and an email for inclusion in the changelog. Point 7 above also applies to contributions without using mercurial. |
| 86 | 194 |
|
| 63 | 195 |
Translation |
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
196 |
=========== |
| 63 | 197 |
|
198 |
Update all po files |
|
199 |
--------------------- |
|
200 |
cd src/cm |
|
201 |
../../bin/django makemessages -a |
|
202 |
../../bin/django makemessages -d djangojs -a |
|
203 |
||
204 |
Compile po files |
|
205 |
---------------- |
|
206 |
cd src/cm |
|
207 |
../../bin/django compilemessages |
|
208 |
||
| 82 | 209 |
Create new file for lang 'LG' |
| 63 | 210 |
----------------------------- |
211 |
cd src/cm |
|
| 82 | 212 |
../../bin/django makemessages -l LG -e .html,.txt |
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
213 |
../../bin/django makemessages -d djangojs -l LG |