Support for <animacja> in HTML.
[librarian.git] / README.md
1 License
2 -------
3
4   ![AGPL Logo](http://www.gnu.org/graphics/agplv3-155x51.png)
5
6     Copyright © 2008-2019 Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org.pl>
7
8     For full list of contributors see AUTHORS file.
9
10     This program is free software: you can redistribute it and/or modify
11     it under the terms of the GNU Affero General Public License as published by
12     the Free Software Foundation, either version 3 of the License, or
13     (at your option) any later version.
14
15     This program is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU Affero General Public License for more details.
19
20     You should have received a copy of the GNU Affero General Public License
21     along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23
24 About
25 ------
26
27 Librarian converts XML-based markup language used by FNP for writing books to
28 other formats, which are more suitable for presentation.
29
30 Currently we support:
31
32  * HTML4, XHTML 1.0 (?)
33  * Plain text
34  * EPUB (XHTML based)
35  * MOBI
36  * print-ready PDF
37  * FB2
38
39 Other features:
40
41  * extract DublinCore meta-data from documents;
42  * extract marked "themes" from documents.
43
44
45 Dependencies
46 ------------
47
48  * lxml <http://codespeak.net/lxml/>, version 2.2 or later
49  * additional PDF converter dependencies:
50    * XeTeX with support for Polish language
51    * TeXML <http://getfo.org/texml/>
52    * recommended: morefloats LaTeX package, version >=1.0c
53      for dealing with documents with many motifs in one paragraph.
54      <http://www.ctan.org/tex-archive/help/Catalogue/entries/morefloats.html>
55
56
57 Installation
58 ------------
59
60 Librarian uses standard Python distutils for packaging. After installing all the dependencies just run:
61
62     python setup.py install
63
64 PDF converter also needs the Junicode-WL fonts (librarian/pdf/JunicodeWL-*.ttf) installed.
65 In Debian/Ubuntu, put those files in ~/.fonts/ and run `fc-cache'.
66
67 Usage
68 ------
69
70 To convert a series of files to XHTML:
71
72     book2html file1.xml [file2.xml ...]
73
74 To convert a series of files to plain text:
75
76     book2txt file1.xml [file2.xml ...]
77
78 To convert a file to EPUB:
79
80     book2epub file.xml
81
82 To convert a file to PDF:
83
84     book2pdf file.xml
85
86 To extract book fragments marked as "theme":
87
88     bookfragments file1.xml [file2.xml ...]