Basic updates in docs.
[wolnelektury.git] / doc / installation.rst
index 6c801c4..81ef4de 100644 (file)
@@ -1,43 +1,54 @@
-==========
-Instalacja
-==========
+=====
+Setup
+=====
 
-Wymagania
----------
-Do działania serwisu wymagane są:
+Requirements
+------------
 
-* `Python 2.5 <http://python.org>`_
-* `Django 1.0 <http://djangoproject.com>`_
-* `lxml 2.2 <http://codespeak.net/lxml/>`_
+* `Python 3.5-3.7 <http://python.org>`_
+* Python requiremets: ``pip install -r requirements/requirements.txt``
+* a library for your database of choice
+  (see `DBs supported by Django <https://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_)
+* `Sass <http://sass-lang.com>`_ >= 3.2 for parsing SCSS stylesheets
+* Librarian has more dependencies if you want to build PDF and MOBI files, 
+  see lib/librarian/README.md
+* `Solr <https://lucene.apache.org/solr/>`_ server if you want to search
 
-Jeżeli używasz Pythona 2.4 lub chcesz użyć bazy danych innej niż SQLite, wymagana jest jeszcze:
 
-* biblioteka do obsługi wybranej bazy danych (`biblioteki wspierane przez Django <http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_)
+Running
+-------
+Set up the database with::
 
-Do pracy nad dokumentacją, którą teraz czytasz, potrzebne są:
+    ./manage.py migrate
 
-* `Sphinx 0.6.2 <http://sphinx.pocoo.org/>`_ i zależności
+Run the dev server with::
 
-Wyższe wersje wymienionych powyżej bibliotek i aplikacji powinny działać równie dobrze, aczkolwiek nie było to testowane.
+    ./manage.py runserver
 
-Uruchomienie
-------------
-Po instalacji wszystkich zależności należy ściągnąć kod serwisu poleceniem::
-    
-    git clone http://jakies.repozytorium.pewnie.github
+Some tasks (like generating e-books) run in a seperate
+Celery process by default, so you'll also need to run::
 
-Następnie należy zainstalować bazę danych::
-    
-    cd wolnelektury/wolnelektury
-    ./manage.py syncdb
-    
-Oraz zaimportować lektury z katalogu books::
+    celery -A wolnelektury worker --loglevel=INFO
 
-    ./manage.py importbooks ../books
+Or, if you don't want to run a separate Celery daemon, set this
+in your ``localsettings.py``::
 
-Teraz wystarczy uruchomić serwer deweloperski poleceniem::
-    
-    ./manage.py runserver
-    
-W wyniku powinniśmy otrzymać całkiem funkcjonalny serwer.
+    CELERY_ALWAYS_EAGER = True
+
+
+Deployment
+----------
+
+TODO
+
+
+Publishing books
+----------------
+
+Books are represented as XML files.
+You can import XML files from a directory by running::
+
+    ./manage.py importbooks ../books
 
+Or you can publish a single XML by using publishing form in admin,
+or the publishing API.