]> git.phdru.name Git - m_librarian.git/blobdiff - docs/before_begin.rst
Update docs: DB URI
[m_librarian.git] / docs / before_begin.rst
index d7521e0d17a2517c55f5626fc7e9ae05895729a0..adc1a2c084692528e4837827f30d07fdbcf2a296 100644 (file)
@@ -33,5 +33,27 @@ 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
+^^^^^^^^^^^^
+
+For m_Librarian to use an SQL server create a configuration file and put
+it in $HOME/.config/ (if your OS is POSIX-compatible). Name the
+configuration file ``m_librarian.conf``. It must be in ``ini``-file
+format and must have the only 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
+<http://sqlobject.org/SQLObject.html#declaring-a-connection>`_.
 
 .. vim: set tw=72 :