| author | gibus |
| Fri, 28 Jan 2011 11:09:34 +0100 | |
| changeset 343 | 7bc8d8bfe443 |
| parent 223 | dfc53876028c |
| child 360 | bfaab8740995 |
| 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+ |
| 37 | 26 |
- Openoffice 3.0+ (headless) & Pandoc |
| 0 | 27 |
|
28 |
||
29 |
Requirements |
|
30 |
------------ |
|
| 36 | 31 |
- python |
32 |
- python magic |
|
33 |
- python development headers |
|
34 |
- python setuptools |
|
35 |
- python uno |
|
| 0 | 36 |
- pandoc |
37 |
- headless openoffice |
|
| 36 | 38 |
- git |
39 |
- libyaml |
|
| 0 | 40 |
(all other python dependencies will be downloaded by buildout) |
41 |
||
42 |
Installation (development install) |
|
43 |
============ |
|
| 31 | 44 |
1. Install python2.5+ and all required libraries |
| 223 | 45 |
(ubuntu users : 'sudo apt-get install python python-magic python-setuptools python-uno libyaml-0-1 python-yaml python-dev git-core python-utidylib') |
| 0 | 46 |
2. Install pandoc |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
47 |
(ubuntu users : 'sudo apt-get install pandoc') |
| 0 | 48 |
3. Install openoffice (headless mode) [used for document conversion] |
| 208 | 49 |
(ubuntu users : 'sudo apt-get install sun-java6-jre openoffice.org openoffice.org-headless xvfb') |
| 0 | 50 |
4. Install/configure database [skip this step if you plan to use a sqlite database] |
51 |
4 a) Postgresql |
|
52 |
- 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
|
53 |
(ubuntu users : 'sudo apt-get install postgresql') |
| 0 | 54 |
- Install database client |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
55 |
(ubuntu users : 'sudo apt-get install postgresql-client') |
| 0 | 56 |
- Install python database connector: psycopg2 |
|
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 python-psycopg2') |
| 0 | 58 |
4 b) Mysql |
59 |
- 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
|
60 |
(ubuntu users : 'sudo apt-get install mysql-server') |
| 0 | 61 |
- Install database client |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
62 |
(ubuntu users : 'sudo apt-get install mysql-client') |
| 0 | 63 |
- Install python database connector: mysqldb |
|
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 python-mysqldb') |
| 0 | 65 |
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] |
66 |
The database account accessing the database MUST have administrative privileges when running the 'syncdb command' (step 8) |
|
67 |
(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
|
68 |
(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
|
69 |
6. Setup the project and get dependencies |
| 0 | 70 |
- `python bootstrap.py` |
71 |
- `./bin/buildout` |
|
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
72 |
7. Configure Comt to your settings |
| 0 | 73 |
- copy settings_local_sample.py to settings_local.py (this file will contain your personal settings) |
74 |
- 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
|
75 |
8. Create the database structure (and test your database connection) |
| 0 | 76 |
- `./bin/django syncdb --settings=settings` |
| 31 | 77 |
- `./bin/django migrate --settings=settings` |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
78 |
9. Create basic right management system |
| 0 | 79 |
- `./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
|
80 |
10. Launch development server |
|
17
a4be0b8a905d
bug fix : can view own comment on comment add on mod priori
reno
parents:
0
diff
changeset
|
81 |
- `./bin/django runserver --settings=settings` |
|
18
f0f9929a4900
add sudo in ubuntu examples for commands to be run as root
gibus
parents:
17
diff
changeset
|
82 |
11. Access your Comt instance by pointing your browser to http://127.0.0.1:8000/ |
| 0 | 83 |
|
84 |
Installation (production environment) |
|
85 |
============= |
|
| 212 | 86 |
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. |
87 |
A few tips thought: |
|
88 |
- recommended way to install it is using apache and wsgi, check out django installation guide at http://www.djangoproject.com/documentation/modpython/ |
|
89 |
- 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 | 90 |
|
| 31 | 91 |
Upgrade |
92 |
======= |
|
93 |
||
94 |
Normal upgrade |
|
95 |
-------------- |
|
96 |
Upgrading you database should only need one command: |
|
| 33 | 97 |
- `./bin/buildout` |
| 31 | 98 |
- `./bin/django migrate --settings=settings` |
99 |
||
100 |
Upgrade from alpha releases |
|
101 |
---------------------------- |
|
102 |
If your database was created using comt alpha prior to the revision 29, here are the commands you should run: |
|
| 33 | 103 |
- `./bin/buildout` |
104 |
- `./bin/django syncdb` |
|
105 |
- `./bin/django migrate cm 0001_initial --fake` |
|
106 |
- `./bin/django migrate` |
|
| 31 | 107 |
|
| 0 | 108 |
Openoffice |
109 |
========== |
|
110 |
Comt uses openoffice to convert documents from ODT, MS Word, etc. to html. |
|
111 |
On a development setup, you should make sure no openoffice process is left and launch |
|
112 |
`soffice -headless "-accept=socket,port=2002;urp;"` to start openoffice in background mode. |
|
113 |
||
114 |
Comt uses |
|
115 |
============ |
|
116 |
||
117 |
Javascript libs used (and license) / shipped with the distribution |
|
118 |
------------------------------------------------------------------ |
|
119 |
- Yahoo UI http://developer.yahoo.com/yui/ BSD License |
|
120 |
- JQuery http://jquery.com/ MIT |
|
121 |
- markItUp http://markitup.jaysalvat.com/home/ MIT/GPL |
|
122 |
||
123 |
Python libraries used (and license) / NOT shipped with the distribution |
|
124 |
----------------------------------------------------------------------- |
|
125 |
- django http://www.djangoproject.com/ BSD License |
|
126 |
- python magic http://hupp.org/adam/hg/python-magic permissive BSD style license |
|
127 |
- Beautiful soup http://www.crummy.com/software/BeautifulSoup/ PSF license |
|
128 |
- python-chardet http://chardet.feedparser.org/ LGPL |
|
129 |
- python-feedparser http://feedparser.org/ "Permissive" custom license |
|
130 |
- python-imaging http://www.pythonware.com/products/pil/ http://www.pythonware.com/products/pil/license.htm |
|
131 |
- python-pytz |
|
132 |
- html5lib |
|
133 |
- python-simplejson |
|
134 |
- python-uno |
|
135 |
- python-utidylib |
|
136 |
- python-yaml |
|
137 |
||
138 |
Icons |
|
139 |
----- |
|
140 |
- Icons derived from FatCow Icon Set http://www.fatcow.com/free-icons/index.bml (Creative Commons Attribution 3.0 License) |
|
141 |
||
142 |
FAQ |
|
143 |
==== |
|
144 |
Q: I get 'import error' when starting the server (step #9) |
|
145 |
R: Make sure you installed all required python dependencies |
|
146 |
||
147 |
Community |
|
148 |
========= |
|
149 |
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. |
|
150 |
||
| 85 | 151 |
How to contribute |
152 |
================= |
|
| 86 | 153 |
|
154 |
Contribute using mercurial |
|
155 |
-------------------------- |
|
| 85 | 156 |
We use mercurial as our source code management system. |
157 |
||
158 |
1. Create a mercurial profile (nickname/email) in ~/.hgrc (cf. http://mercurial.selenic.com/quickstart for more info). |
|
159 |
This is important because your name will appear in your changeset once it gets accepted into the mainline |
|
160 |
2. Clone the repository `hg clone http://hg.co-ment.org/ comt` |
|
161 |
OR update your copy of the source code: `hg update` |
|
162 |
3. Hack, hack |
|
163 |
4. Commit locally: `hg commit -m "MY COMMIT MESSAGE"` |
|
164 |
5. Export your changeset to a file: `hg export tip > my_patch.txt` |
|
165 |
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
|
166 |
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 | 167 |
|
| 86 | 168 |
Contribute without using mercurial |
169 |
---------------------------------- |
|
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
170 |
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
|
171 |
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 | 172 |
|
| 63 | 173 |
Translation |
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
174 |
=========== |
| 63 | 175 |
|
176 |
Update all po files |
|
177 |
--------------------- |
|
178 |
cd src/cm |
|
179 |
../../bin/django makemessages -a |
|
180 |
../../bin/django makemessages -d djangojs -a |
|
181 |
||
182 |
Compile po files |
|
183 |
---------------- |
|
184 |
cd src/cm |
|
185 |
../../bin/django compilemessages |
|
186 |
||
| 82 | 187 |
Create new file for lang 'LG' |
| 63 | 188 |
----------------------------- |
189 |
cd src/cm |
|
| 82 | 190 |
../../bin/django makemessages -l LG -e .html,.txt |
|
94
2760e9b4156e
Minor language/formatting issues
Kirill Miazine <km@krot.org>
parents:
86
diff
changeset
|
191 |
../../bin/django makemessages -d djangojs -l LG |