File: mpd_sima.1.xml

package info (click to toggle)
mpd-sima 0.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 688 kB
  • ctags: 342
  • sloc: python: 2,696; xml: 924; sh: 329; makefile: 86
file content (342 lines) | stat: -rw-r--r-- 17,207 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [

<!--

`xsltproc -''-nonet \
          -''-param man.charmap.use.subset "0" \
          -''-param make.year.ranges "1" \
          -''-param make.single.year.ranges "1" \
          /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
          manpage.xml'

A manual page <package>.<section> will be generated. You may view the
manual page with: nroff -man <package>.<section> | less'. A typical entry
in a Makefile or Makefile.am is:

DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
XP     = xsltproc -''-nonet -''-param man.charmap.use.subset "0"

manpage.1: manpage.xml
        $(XP) $(DB2MAN) $<

The xsltproc binary is found in the xsltproc package. The XSL files are in
docbook-xsl. A description of the parameters you can use can be found in the
docbook-xsl-doc-* packages. Please remember that if you create the nroff
version in one of the debian/rules file targets (such as build), you will need
to include xsltproc and docbook-xsl in your Build-Depends control field.
Alternatively use the xmlto command/package. That will also automatically
pull in xsltproc and docbook-xsl.

Notes for using docbook2x: docbook2x-man does not automatically create the
AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as
<refsect1> ... </refsect1>.

To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections
read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be
found in the docbook-xsl-doc-html package.

Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`

General documentation about man-pages and man-page-formatting:
man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/

-->
  <!ENTITY dhsection   "1">
  <!-- TITLE should be something like "User commands" or similar (see
       http://www.tldp.org/HOWTO/Man-Page/q2.html). -->
  <!ENTITY dhfirstname "Jack">
  <!ENTITY dhsurname   "Kaliko">
  <!ENTITY dhemail     "efrim@azylum.org">
  <!-- username could also be set to "&firstname; &surname;".  -->
  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">

  <!ENTITY dhucpackage "mpd-sima">
  <!ENTITY dhpackage "mpd-sima">
  <!ENTITY dhutils "mpd-sima">
  <!ENTITY release   "0.10.0">
  <!ENTITY projecturl "http://codingteam.net/project/sima">
  <!ENTITY dhtitle     "&dhpackage; User Manual">
  <!ENTITY dhucpackage "#UCPACKAGE#">

  <!ENTITY header SYSTEM "header.xml">
  <!ENTITY feedback_bugs SYSTEM "feedback_bugs.xml">
  <!ENTITY album SYSTEM "album.cfg">
]>

<refentry>
    &header;
  <refnamediv>
    <refname>&dhpackage;</refname>
    <refpurpose>&dhpackage; will try to maintain some titles ahead in your play list following different policies.</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage;</command>
      <arg choice="opt"><option>--daemon</option></arg>
      <arg choice="opt"><option>--config=</option><replaceable class="option">conf_file</replaceable></arg>
      <arg choice="opt"><option>--var_dir=</option><replaceable class="option">var_directory</replaceable></arg>
      <arg choice="opt"><option>--pid=</option><replaceable class="option">pid_file</replaceable></arg>
      <arg choice="opt"><option>--log=</option><replaceable class="option">log_file</replaceable></arg>
      <arg choice="opt"><option>--host=</option><replaceable class="option">mpd_host</replaceable></arg>
      <arg choice="opt"><option>--mpd_port=</option><replaceable class="option">mpd_port</replaceable></arg>
      <arg choice="opt"><option>--new-version</option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>&dhpackage;</command>
      <arg choice="opt"><option>--var_dir=</option><replaceable class="option">var_directory</replaceable></arg>
      <arg choice="opt"><option>--create-db></option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>&dhpackage;</command>
      <!-- Normally the help and version options make the programs stop
           right after outputting the requested information. -->
      <group choice="opt">
        <arg choice="plain">
          <group choice="req">
            <arg choice="plain"><option>-h</option></arg>
            <arg choice="plain"><option>--help</option></arg>
          </group>
        </arg>
        <arg choice="plain"><option>--version</option></arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1 id="description">
    <title>DESCRIPTION</title>
    <para>This manual page documents briefly the
      <command>&dhpackage;</command> commands.</para>
    <para>At start up default configuration is first overridden by user
        configuration in mpd_sima.cfg (see <xref linkend="files"/>) and finally
        command lines options are honored. For instance you can override
        default MPD_HOST set in defaults (localhost) or in your configuration
        file with <command>-S my_mpd_server</command> option. For default
        configuration see <xref linkend="configuration"/>.</para>
  </refsect1>
    <refsect1 id="example">
        <title>EXAMPLE</title>
        <refsect2 id="daemon">
            <title>Launch as a system service (dæmon).</title>
            <para>Here follows an example on how to launch &dhpackage; as a service on your system, not attach to regular user configuration/database.</para>
            <para><command>&dhpackage; --daemon --conf=/etc/mpd_sima.cfg --var_dir=/var/cache/mpd-sima/ --pid=/var/run/mpd-sima.pid --log=/var/log/mpd-sima.log</command></para>
        </refsect2>
        <refsect2 id="user_land">
            <title>Launch in user land</title>
            <para>Launching &dhpackage; from/whithin your user acount is easy, you can simply call <command>&dhpackage;</command> from your shell or one of the following command:</para>
            <para>Background execution (dæmonise), log in the specified file, save pid:</para>
            <para><command>&dhpackage; --daemon --pid=$HOME/var/run/mpd-sima.pid --log=$HOME/var/log/mpd-sima.log</command></para>
            <para>Foreground execution, connect <emphasis>my.mpd.server.org</emphasis>, log to std(out|err):</para>
            <para><command>&dhpackage; --host=my.mpd.server.org</command></para>
        </refsect2>
    </refsect1>
  <refsect1 id="options">
    <title>OPTIONS</title>
    <para>The program follows the usual GNU command line syntax,
      with long options starting with two dashes (`-').  A summary of
      options is included below.</para>
    <variablelist>
      <!-- Use the variablelist.term.separator and the
           variablelist.term.break.after parameters to
           control the term elements. -->
           <varlistentry> <!-- help -->
            <term><option>-h</option></term>
            <term><option>--help</option></term>
            <listitem>
                <para>Print help and exit.</para>
            </listitem>
        </varlistentry>
        <varlistentry> <!-- version -->
            <term><option>--version</option></term>
            <listitem>
                <para>Print version and exit.</para>
            </listitem>
        </varlistentry>
        <varlistentry> <!-- daemon -->
            <term><option>--daemon</option></term>
            <listitem>
                <para>Start as a daemon. Log redirected to /dev/null, usually setting <option>--log</option> and <option>--pid</option> options in daemon mode are a good idea to monitor/stop the process.</para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><option>-p <replaceable class="parameter">pid_file</replaceable></option></term>
            <term><option>--pid=<replaceable class="parameter">pid_file</replaceable></option></term>
            <listitem>
                <para>Use the specific file <replaceable>pid_file</replaceable> to store pid to.<sbr />Default is not to store pid info.</para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><option>-l <replaceable class="parameter">log_file</replaceable></option></term>
            <term><option>--log=<replaceable class="parameter">log_file</replaceable></option></term>
            <listitem>
                <para>Use the specific file <replaceable>log_file</replaceable> to log messages to.<sbr />Default is to log to stdout/stderr.</para>
            </listitem>
        </varlistentry>
        <varlistentry>
            <term><option>-c <replaceable class="parameter">conf_file</replaceable></option></term>
            <term><option>--config=<replaceable class="parameter">conf_file</replaceable></option></term>
            <listitem>
                <para>Use the specific file <replaceable>conf_file</replaceable> to set up configuration instead of looking for the default user configuration file.<sbr />Default is to look for <envar>$XDG_CONFIG_HOME/mpd_sima/mpd_sima.cfg</envar>.  Concerning this file see also <xref linkend="files"/>.<sbr />Pay attention: Because you load a specific configuration file from command line interface <emphasis>does not mean</emphasis> it will override others options pass to mpd_sima. In other words launching with <option>-P 6666</option> will override port setting whatever the configuration file your using, default or command line specified.</para>
            </listitem>
        </varlistentry>
        <varlistentry> <!-- var_dir -->
            <term><option>--var_dir=<replaceable class="parameter">var_directory</replaceable></option></term>
            <listitem>
                <para>Use the specific path <replaceable>var_directory</replaceable> to look for (or create) var files (ie. database) instead of looking at the default user data location.<sbr />Default is to look in <envar>$XDG_DATA_HOME/mpd_sima/</envar>.  Concerning <envar>$XDG_DATA_HOME</envar> see also <xref linkend="files"/></para>
            </listitem>
        </varlistentry>
        <varlistentry> <!-- create-db -->
            <term><option>--create-db</option></term>
            <listitem>
                <para>Create the database and exit. Uses folder specified with <option>--var_dir</option> or default directory.<sbr />Default is to use <envar>$XDG_DATA_HOME/mpd_sima/</envar>.  Concerning <envar>$XDG_DATA_HOME</envar> see also <xref linkend="files"/></para>
            </listitem>
        </varlistentry>
        <varlistentry><!-- host -->
            <term><option>-S <replaceable class="parameter">mpd_host</replaceable></option></term>
            <term><option>--host=<replaceable class="parameter">mpd_host</replaceable></option></term>
            <listitem>
                <para>Use the specific host <replaceable>mpd_host</replaceable> as MPD server.<sbr /><replaceable>mpd_host</replaceable> can be an <acronym>IP</acronym> or a fully qualified domain name as long as your system can resolve it. This overrides <envar>MPD_HOST</envar> environment variable.<sbr />Default is <emphasis>localhost</emphasis>.</para>
                <para>See also <xref linkend="environment"/>.</para>
            </listitem>
        </varlistentry>
        <varlistentry><!-- port -->
            <term><option>-P <replaceable class="parameter">mpd_port</replaceable></option></term>
            <term><option>--port=<replaceable class="parameter">mpd_port</replaceable></option></term>
            <listitem>
                <para>Use the specific port number <replaceable>mpd_port</replaceable> on MPD server. This overrides <envar>MPD_PORT</envar> environment variable.<sbr />Default is <emphasis>6600</emphasis>.</para>
                <para>See also <xref linkend="environment"/></para>
            </listitem>
        </varlistentry>
        <varlistentry><!-- new-version -->
            <term><option>--new-version</option></term>
            <listitem>
                <para>Check and log for new version at start up (issue a warning).</para>
            </listitem>
        </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1 id="files">
      <title>FILES</title>
      <variablelist>
          <varlistentry>
              <term><filename>${XDG_CONFIG_HOME}/mpd_sima/mpd_sima.cfg</filename></term>
              <!--
              <listitem>
              </listitem>
              <term><filename>${HOME}/.config/mpd_sima/mpd_sima.cfg</filename></term>
              -->
              <listitem>
                  <para>The per-user configuration file. Usually <envar>XDG_CONFIG_HOME</envar> is set to <filename>${HOME}/.config</filename>.</para>
              </listitem>
          </varlistentry>
          <varlistentry>
              <term><filename>${XDG_DATA_HOME}/mpd_sima/sima.db</filename></term>
              <!--
              <listitem>
              </listitem>
              <term><filename>${HOME}/.local/share/mpd_sima/history.pkl</filename></term>
              -->
              <listitem>
                  <para>SQLite database. Usually <envar>XDG_DATA_HOME</envar> is set to <filename>${HOME}/.local/share</filename>.</para>
              </listitem>
          </varlistentry>
      </variablelist>
  </refsect1>
  <refsect1 id="environment">
      <title>ENVIRONMENT</title>
      <variablelist>
          <varlistentry>
              <term><envar>MPD_HOST</envar>, <envar>MPD_PORT</envar></term>
              <listitem>
                  <para>&dhutils; will look for <envar>MPD_HOST</envar> and
                      <envar>MPD_PORT</envar> to override built-in configuration
                      (set to "localhost:6600").</para>
                  <para>&dhutils; expects <envar>MPD_HOST</envar> syntax as documented in mpc manual, 
                      cf. <citerefentry><refentrytitle>mpc</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
                      <sbr/>To use a password, provide a value of the form "password@host".
                  </para>
              </listitem>
          </varlistentry>
      </variablelist>
  </refsect1>
  <refsect1 id="configuration">
      <title>CONFIGURATION</title>
      <variablelist>
          <varlistentry>
              <term><filename>mpd_sima.cfg</filename></term>
              <listitem>
                  <para><filename>mpd_sima.cfg</filename> is read if present.
                      Otherwise built-in defaults are used. An example should be
                      provided in the tarball within
                      <filename>doc/examples/mpd_sima.cfg</filename>. On Debian
                      system please look in
                      <filename>/usr/share/doc/&dhpackage;</filename>.</para>
              </listitem>
          </varlistentry>
          <varlistentry>
              <term>DEFAULTS</term>
              <listitem>
                  <para>Default is to look for MPD server at localhost:6600 (or MPD_HOST/MPD_PORT env. var. if set).</para>
                        <para>The default behavior is to add one track,
                            this track is to be chosen among titles from
                            artists similar to the artist of the currently
                            played track. MPD_sima will add one track when the
                            play list is one track long.</para>
                  <para>To change these defaults, use the configuration file <filename>mpd_sima.cfg</filename></para>
              </listitem>
          </varlistentry>
      </variablelist>
  </refsect1>
 <!--
  <refsect1 id="diagnostics">
    <title>DIAGNOSTICS</title>
    <para>The following diagnostics may be issued
      on <filename class="devicefile">stderr</filename>:</para>
    <variablelist>
      <varlistentry>
        <term><errortext>Bad configuration file. Exiting.</errortext></term>
        <listitem>
          <para>The configuration file seems to contain a broken configuration
            line. Use the <option>-''-verbose</option> option, to get more info.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
    <para><command>&dhpackage;</command> provides some return codes, that can
      be used in scripts:</para>
    <segmentedlist>
      <segtitle>Code</segtitle>
      <segtitle>Diagnostic</segtitle>
      <seglistitem>
        <seg><errorcode>0</errorcode></seg>
        <seg>Program exited successfully.</seg>
      </seglistitem>
      <seglistitem>
        <seg><errorcode>1</errorcode></seg>
        <seg>The configuration file seems to be broken.</seg>
      </seglistitem>
    </segmentedlist>
  </refsect1>
  -->
    &feedback_bugs;
  <refsect1 id="see_also">
    <title>SEE ALSO</title>
    <!-- In alpabetical order. -->
    <para>
        <citerefentry>
            <refentrytitle>mpc</refentrytitle>
            <manvolnum>1</manvolnum>
            </citerefentry>, <citerefentry>
            <refentrytitle>mpd</refentrytitle>
            <manvolnum>1</manvolnum>
            </citerefentry>, <citerefentry>
            <refentrytitle>mpd-sima.cfg</refentrytitle>
            <manvolnum>5</manvolnum>
        </citerefentry>
    </para>
      <para>
          <filename>/usr/share/doc/mpd-sima/</filename>
      </para>
  </refsect1>
</refentry>