To understand how the reanalyse project works, you'll need to read carefully:
readme.md
file./templates/content/method_content_fr.html
page, included in the site./reanalyseapp/globalvars.py
file, explaining the technical part of codes$ sudo aptitude install git
$ mkdir /var/opt/reanalyse
$ git clone https://github.com/medialab/reanalyse.git reanalyse
$ sudo aptitute install default-jre
$ sudo aptitude install apache2-threaded-dev
$ apxs2 -iac mod_xsendfile.c
$ sudo pip install django-haystack
$ sudo pip install django-tables2
$ sudo aptitude install python-dev
$ sudo aptitude install python-lxml
$ hg clone https://bitbucket.org/cogtree/python-solr
$ sudo pyton python-solr/setup.py install
$ sudo easy_install python-magic
$ vi /apache/reanalyse.conf
$ vi /apache/django.wsgi
./settingsprivate.py
./download/
./logs/
./solrdataindex/
./upload/
$ vi settingsprivate.py
$ mkdir logs upload download solrdataindex
$ sudo chown -R www-data:www-data solr log upload download
remplacer ident par md5 pour local désactiver les autres host
$ sudo vi /etc/postgresql/8.4/main/pg_hba.conf
check port 5432 postgresql conf
$ sudo vi /etc/postgresql/8.4/main/postgresql.conf
create db and user
$ sudo su - postgres
$ psql
$ postgres=# create user reanalyse with password 'password';
$ postgres=# CREATE DATABASE reanalyse WITH OWNER=reanalyse;
$ postgres=# grant all privileges on database reanalyse to reanalyse;
$ postgres=# \q
$ python manage.py syncdb
$ sudo ln -s /var/opt/reanalyse/apache/reanalyse.conf /etc/apache2/sites-available/
$ sudo a2ensite reanalyse.conf
$ sudo service apache2 reload
files are stored within the ./template/content/
dir
{% load i18n %}
...
{% comment %}Translators: Login page title{% endcomment %}
<title>{% trans 'Login Page' %}</title>
from django.utils.translation import ugettext as _
...
mystring = _('congratulations')
$ sudo apt-get install gettext
from django project root, do:
$ sudo django-admin.py makemessages --ignore ./upload --ignore ./media --ignore ./solr -a
manually translate file ./locale/fr/LC_MESSAGES/django.po
$ django-admin.py compilemessages
./solr/solr/conf/schema.xml
defining how models are indexed./solr/solr/conf/solrconfig.xml
defines:
datadir = ./../solrdataindex/
(temp files)< maxFieldLength > 2147483647 < /maxFieldLength >
(in case of big files)./solr/etc/jetty.xml
if you want to change webserver port./solr/solr/conf/*_fr.txt
: stopwords, synonyms, protwords, etc...the normalisation process is described within the "Method" page in the website ./templates/content/method_content_fr.html
to add more icons, please refer to the comments within the ./reanalyseapp/globalvars.py
file