]> git.phdru.name Git - m_librarian.git/blob - docs/before_begin.rst
No highlighting in code blocks
[m_librarian.git] / docs / before_begin.rst
1
2 Before you begin
3 ================
4
5 Before you begin you need some preparations.
6
7
8 .. contents::
9    :local:
10
11 .. highlight:: none
12
13 Software
14 --------
15
16 m_Librarian is written in Python and requires Python 2.7. So install
17 Python 2.7 first. Install required modules: SQLObject and m_lib.
18
19
20 Library archives
21 ----------------
22
23 The program works with local library archives so download some. In
24 addition to the very libraries you need to get INPX indices for them —
25 m_Librarian cannot index libraries yet.
26
27
28 Database
29 --------
30
31 The program needs a database. It can work with any database supported by
32 SQLObject. Preferred ones are: MySQL, PostgreSQL or SQLite. If you plan
33 to use an SQL server you must create a database yourself. For SQLite,
34 the database file will be created by the program, so it's the simplest
35 way of using m_Librarian.
36
37 Database URI
38 ^^^^^^^^^^^^
39
40 For m_Librarian to use an SQL server create a configuration file and put
41 it in $HOME/.config/ (if your OS is POSIX-compatible). Name the
42 configuration file ``m_librarian.conf``. It must be in ``ini``-file
43 format and must have the only section ``[database]`` with the only key
44 ``URI``. The value for the key must be a Database URI in format accepted
45 by SQLObject. Some examples::
46
47    [database]
48    URI = mysql://user:password@host/database
49
50    [database]
51    URI = postgres://user@host/database
52
53    [database]
54    URI = sqlite:///full/path/to/database
55
56 See some more examples in sample/m_librarian.conf. See detailed
57 description for DB URIs in `SQLObject documentation
58 <http://sqlobject.org/SQLObject.html#declaring-a-connection>`_.
59
60 .. vim: set tw=72 :