X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=docs%2Fbefore_begin.rst;h=1dcd27db77c5f0c0f467c230ec1d62b827bd0cfa;hb=27e67b25ddd894ac7d6c6ef8d507e2d72d1a7004;hp=d7521e0d17a2517c55f5626fc7e9ae05895729a0;hpb=f914b910cf3f1bd2940a664a67ede3683ba9e1fb;p=m_librarian.git diff --git a/docs/before_begin.rst b/docs/before_begin.rst index d7521e0..1dcd27d 100644 --- a/docs/before_begin.rst +++ b/docs/before_begin.rst @@ -8,12 +8,14 @@ Before you begin you need some preparations. .. contents:: :local: +.. highlight:: none Software -------- m_Librarian is written in Python and requires Python 2.7. So install -Python 2.7 first. Install required modules: SQLObject and m_lib. +Python 2.7 first. Install required modules: SQLObject and m_lib.defenc. +pip `installs `_ required modules automatically. Library archives @@ -23,6 +25,25 @@ The program works with local library archives so download some. In addition to the very libraries you need to get INPX indices for them — m_Librarian cannot index libraries yet. +Configuration file +------------------ + +m_librarian looks up configuration file in $HOME/.config/ (if your OS is +POSIX-compatible). The configuration file must be named +``m_librarian.conf``. It must be in ``ini``-file format. The following +sections and keys are now understood:: + + [database] + URI = "database URI" + + [library] + path = "path to the library archives" + + [download] + format = "download file format" + +Most programs have an option `-C|--config file` to use a non-default +configuration file. Database -------- @@ -33,5 +54,24 @@ to use an SQL server you must create a database yourself. For SQLite, the database file will be created by the program, so it's the simplest way of using m_Librarian. +Database URI +^^^^^^^^^^^^ + +In configuration file define section ``[database]`` with the only key +``URI``. The value for the key must be a Database URI in format accepted +by SQLObject. Some examples:: + + [database] + URI = mysql://user:password@host/database + + [database] + URI = postgres://user@host/database + + [database] + URI = sqlite:///full/path/to/database + +See some more examples in sample/m_librarian.conf. See detailed +description for DB URIs in `SQLObject documentation +`_. .. vim: set tw=72 :