.. contents::
:local:
+.. highlight:: none
ml-initdb.py
------------
Usage::
- ml-initdb.py [-d]
+ ml-initdb.py [-C] [-D]
Options::
- -d, --database database Open this database by pathname/db uri
+ -C, --config config Configuration file
+ -D, --database database Open this database by pathname/db uri
Initialize database and import genres list. Isn’t really needed as
the next script does all that too.
Usage::
- ml-import.py [-d] [file.inpx ...]
+ ml-import.py [-C] [-D] [file.inpx ...]
Options::
- -d, --database database Open this database by pathname/db uri
+ -C, --config config Configuration file
+ -D, --database database Open this database by pathname/db uri
Initialize database, import genres list and import a list of INPX files
listed in the command line. On subsequent runs doesn’t destroy DB or
Usage::
- ml-search.py [-d] [-i] [-I] [-t] [-s] [-f] [-v] [-c] ...
+ ml-search.py [-C] [-D] [-i] [-I] [-t] [-s] [-f] [-v] [-c] ...
Search through the database and display results. Currently can only
search authors by name.
Global options::
- -d, --database database Open this database by pathname/db uri
+ -C, --config config Configuration file
+ -D, --database database Open this database by pathname/db uri
-i, --ignore-case ignore case (default is to guess)
-I, --case-sensitive don’t ignore case
-t, --start search type: substring at the start
Usage::
- ml-search.py books [-t title] [-s series] [-a archive] [-f file] [-p path] [--format f] [--get] [--get-many N] [--id id] [--surname name] [--name name] [--misc-name name] [--fullname name] [--aid aid] [-e ext] [--eid eid] [--gname name] [--gtitle title] [--gid gid] [-l lang] [--lid lid]
+ ml-search.py books [-t title] [-s series] [-a archive] [-f file] [--id id] [--surname name] [--name name] [--misc-name name] [--fullname name] [--aid aid] [-e ext] [--eid eid] [--gname name] [--gtitle title] [--gid gid] [-l lang] [--lid lid] [-P path] [-F format] [--get] [--get-many N]
Search and print a list of books by title, series, archive or file name.
-s, --series series Search by series
-a, --archive archive Search by archive (zip file)
-f, --file file Search by file name (without extension)
- -p, --path path Path to the directory with the library
- archives
- --format format Format of the downloaded file name
- --get Download exactly one book
- --get-many N Download at most this many books
--id id Search by database id
--surname surname Search by author’s surname
--name name Search by author’s name
--gid gid Search by genre’s id
-l, --lang lang Search by language
--lid lid Search by language’s id
+ -P, --path path Path to the directory with the library
+ archives
+ -F, --format format Format of the downloaded file name
+ --get Download exactly one book
+ --get-many N Download at most this many books
By default the program prints only titles of the found book. With one
option `-v` it also prints database id, the list of authors and genres,
archive name, file name, extension and size, and flag if the book is
marked to be deleted.
-Option `-p` provides the path to the directory with the library
-archives. By default the path is extracted from `m_librarian.conf`,
+Option `-P` provides the path to the directory with the library
+archives. By default the path is extracted from configuration file,
section `[library]`, key `path`::
[library]
path = /var/lib/archives
-The option is useful for multiple databases (global option `-d`).
+The option is useful for multiple databases (global option `-D`).
Option `--get` allows to download a book from the library to a local
file. The option allows to download exactly one book. The simplest way
unconditionally with a dot. That is, format `%f` is equivalent to
`%f.%e`.
-Option `--format format` allows to overwrite this configuration value.
+Option `-F|--format format` allows to overwrite this configuration value.
Option `--get-many N` allows to download many books (at most N, where N
is an integer). Options `--get-many N` and `--get` are, of course,