]> git.phdru.name Git - m_librarian.git/blob - docs/command_line.rst
f3f2f58daaa062c6d501ec22a811dc2a0bd3a20c
[m_librarian.git] / docs / command_line.rst
1
2 Command-line scripts
3 ====================
4
5
6 .. contents::
7    :local:
8
9
10 ml-initdb.py
11 ------------
12
13 Initialize database and import genres list. Doesn't really needed as
14 the next script does all that too.
15
16
17 ml-import.py
18 ------------
19
20 Usage::
21
22     ml-import.py [file.inpx ...]
23
24 Initialize database, import genres list and import a list of INPX files
25 listed in the command line. On subsequent runs doesn't destroy DB or
26 reimport genres; it also skips already import books but import new ones.
27
28
29 ml-search.py
30 ------------
31
32 Usage::
33
34     ml-search.py [-i] [-I] [-t {exact,start,substring}] ...
35
36 Search through the database and display results. Currently can only
37 search authors by name.
38
39 Global options::
40
41     -i, --ignore-case     ignore case (default is to guess)
42     -I, --case-sensitive  don't ignore case
43     -t, --search-type {exact,start,substring}
44         search type: exact match, substring at the start (this is the default),
45         substring anywhere.
46
47 Options ``-i/-I`` cannot be used together as they are the opposite. In
48 case none of them are used the program guesses case-sensitivity by
49 looking at the arguments. If all arguments are lowercase the program
50 performs case-insensitive search. If there are UPPERCASE or MixedCase
51 arguments the program performs case-sensitive search.
52
53 Option ``-t/--search-type`` defines the search type. Search types are:
54
55 * exact - search for exact match; i.e. searching for "duck" returns
56   results for "duck" but not for "duckling";
57 * start - search for substring at the start of the search field; for
58   example searching for "duck" returns results for "duck" and "duckling"
59   but not for "McDuck"; this is the default search type.
60 * substring - search for any substring; "duck" => "duck", "duckling",
61   "McDuck" (except for case-sensitive search, of course).
62
63 .. vim: set tw=72 :