With one option `-v` it also prints database id.
-Book search
-^^^^^^^^^^^
+Book searching and downloading
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Usage::
- ml-search.py books [-t title] [-s series] [-a archive] [-f file] [-p path] [--get] [--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] [-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]
Search and print a list of books by title, series, archive or file name.
-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
to use it is via option `--id`. The file is downloaded into the current
directory with the name from the library.
+Configuration key
+
+| [download]
+| format = %a/%s/%n %t
+
+allows to set format for the download file pathname. Default format is
+`%f`, i.e. just filename. Other format specifiers are::
+
+ %a - author (one of if many)
+ %e - file extension
+ %f - file name in archive
+ %G - genre (one of if many), name
+ %g - genre (one of if many), title
+ %l - language
+ %n - series number (or 0)
+ %s - series
+ %t - title
+
+Format must not end in directory separator (`/` or `\\`). If specifier
+`%e` (extension) is not found in the format it is appended
+unconditionally with a dot. That is, format `%f` is equivalent to
+`%f.%e`.
+
+Option `--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,
+mutually incompatible.
+
Extension search
^^^^^^^^^^^^^^^^