]> kaliko git repositories - mpd-sima.git/blob - doc/source/man/mpd-sima.1.rst
doc: Merge manual in sphinx build
[mpd-sima.git] / doc / source / man / mpd-sima.1.rst
1 ========
2 mpd-sima
3 ========
4
5 SYNOPSYS
6 --------
7
8 ``mpd-sima [--daemon] [--config=conf_file] [--var-dir=var_directory] [--pid=pid_file] [--log=log_file] [--log-level=log_level] [--host=mpd_host] [--mpd_port=mpd_port]``
9
10 ``mpd-sima {{-h | --help} --version}``
11
12 ``mpd-sima [--config=conf_file] config-test``
13
14 ``mpd-sima [--var-dir=var_directory] create-db``
15
16 ``mpd-sima […] generate-config``
17
18 ``mpd-sima [--var-dir=var_directory] purge-history``
19
20 ``mpd-sima bl-view``
21
22 ``mpd-sima bl-add-artist [artist]``
23
24 ``mpd-sima bl-add-album [album]``
25
26 ``mpd-sima bl-add-track [track]``
27
28 ``mpd-sima bl-delete id``
29
30
31 DESCRIPTION
32 -----------
33
34 This manual page documents briefly the ``mpd-sima`` commands.
35
36 At start up default configuration is first overridden by user configuration in
37 mpd_sima.cfg (see FILES_) and finally command lines options are honored. For
38 instance you can override default MPD host (localhost) in your configuration
39 file or with ``-S my_mpd_server.local`` option. For default configuration see
40 CONFIGURATION_. See also environment variables special case for MPD host and
41 port in ENVIRONMENT_.
42
43
44 OPTIONS
45 -------
46
47 The program follows the usual GNU command line syntax, with long options
48 starting with two dashes ('-'). A summary of options is included below.
49
50 ``-h``; ``--help``
51    Print help and exit.
52
53 ``--version``
54    Print version and exit.
55
56 ``--daemon``
57    Start as a daemon. Log redirected to :file:`/dev/null`, usually setting
58    ``--log`` and ``--pid`` options in daemon mode are a good idea to
59    monitor/stop the process.
60
61 ``-p pid_file``; ``--pid=pid_file``
62    Use the specific file pid_file to store pid to.
63
64    Default is not to store pid info.
65
66 ``-l log_file``; ``--log=log_file``
67    Use the specific file log_file to log messages to.
68
69    Default is to log to stdout/stderr.
70
71 ``-v log_level``; ``--log-level=log_level``
72    Verbosity in [debug,info,warning,error].
73
74    Default is to log info messages.
75
76 ``-c conf_file``; ``--config=conf_file``
77    Use the specific file conf_file to set up configuration instead of
78    looking for the default user configuration file.
79
80    Default is to look for :file:`${{XDG_CONFIG_HOME}}/mpd_sima/mpd_sima.cfg`.
81    CLI option overrides any equivalent mentioned in configuration file, ie.
82    launching mpd-sima with ``--port`` CLI option will ignore port setting in
83    configuration file.
84
85    For more details on configuration file see also `FILES <#files>`__ and `CONFIGURATION <#configuration>`__ sections.
86
87 ``--var-dir=var_directory``
88    Use the specific path var_directory to look for (or create) var files
89    (ie. database) instead of looking at the default user data
90    location.
91
92    Default is to look in :file:`${{XDG_DATA_HOME}}/mpd_sima/`. Concerning
93    :envvar:`XDG_DATA_HOME` see also `FILES section <#files>`__.
94
95 ``-S mpd_host``; ``--host=mpd_host``
96    Use the specific host mpd_host as MPD server.mpd_host can be an IP or
97    a fully qualified domain name as long as your system can resolve it.
98    This overrides MPD_HOST environment variable.
99    Default is *localhost*.
100
101    See also `ENVIRONMENT section <#environment>`__.
102
103 ``-P mpd_port``; ``--port=mpd_port``
104    Use the specific port number mpd_port on MPD server. This overrides
105    MPD_PORT environment variable.Default is *6600*.
106
107    See also `ENVIRONMENT section <#environment>`__
108
109 Command arguments
110 -----------------
111
112 ``config-test``
113    Test configuration file and exit. Uses the configuration file
114    specified with ``--config`` or default location.
115    Default is to use $XDG_CONFIG_HOME/mpd_sima/mpd_sima.cfg.
116
117    config-test tests MPD connection and Tags plugin configuration.
118
119 ``create-db``
120    Create the database and exit. Uses folder specified with
121    ``--var-dir`` or default directory.
122
123    Default is to use :file:`${{XDG_DATA_HOME}}/mpd_sima/` (see `CONFIGURATION
124    section <#configuration>`__ for more).
125
126 ``generate-config``
127    Generate a sample configuration file according to the current CLI
128    options and environment variables. The configuration is written on stdout.
129
130 ``purge-history``
131    Purge play history in the database and exit. Uses folder specified
132    with ``--var-dir`` or default directory.
133
134    Default is to use :file:`${{XDG_DATA_HOME}}/mpd_sima/` (see `FILES section
135    <#files>`__ for more).
136
137 ``bl-view``
138    View blocklist, useful to get entry IDs to remove with delete
139    command.
140
141 ``bl-add-artist artist``
142    Add artist to the blocklist. If artist is not provided, try to get
143    the currently playing artist.
144
145 ``bl-add-album album``
146    Add album to the blocklist. If album is not provided, try to get the
147    currently playing album.
148
149 ``bl-add-track track``
150    Add track to the blocklist. If track is not provided, try to get the
151    currently playing track.
152
153 ``bl-delete id``
154    Remove blocklist entry referenced by its id. Use bloclist view
155    command to get the id.
156
157 ENVIRONMENT
158 -----------
159
160 :envvar:`MPD_HOST`, :envvar:`MPD_PORT`
161    mpd-sima will look for MPD_HOST and MPD_PORT to override built-in
162    configuration (set to "localhost:6600").
163
164    mpd-sima expects MPD_HOST syntax as documented in mpc manual, cf.
165    :manpage:`mpc(1)`. To use a password, provide a value of the form **password@host**.
166
167 :envvar:`HTTP_PROXY`, :envvar:`HTTPS_PROXY`
168    mpd-sima honors HTTP_PROXY environment variables.
169
170
171 CONFIGURATION
172 -------------
173
174 :file:`mpd_sima.cfg`
175    :file:`mpd_sima.cfg` is read if present. Otherwise built-in defaults are
176    used. An example should be provided in the tarball within ``doc/examples/``.
177    On Debian system please look in :file:`/usr/share/doc/mpd-sima`.
178
179 **DEFAULTS**
180
181    Default is to look for MPD server at localhost:6600 (or
182    :envvar:`MPD_HOST`/:envvar:`MPD_PORT` env. var. if set).
183
184    The default plugins will use Last.fm to find similar tracks to queue and
185    fallback to random if nothing if found.
186
187    The get the defaults as detected by mpd-sima on your system you can
188    run mpd-sima to print the config:
189
190    ``mpd-sima generate-config``
191
192 .. only:: format_man
193
194    For details about mpd_sima.cfg refer to the manual :manpage:`mpd_sima.cfg(5)`
195
196 .. only:: format_html
197
198    For details about mpd_sima.cfg refer to the manual :doc:`mpd_sima.cfg.5`
199
200 .. include:: files.rst
201 .. include:: seealso.rst
202 .. include:: info.rst