</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
- <refpurpose>&dhpackage; will try to maintain some titles ahead in your play list following different policies.</refpurpose>
+ <refpurpose>&dhpackage; will try to maintain some titles ahead in the queue 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>--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>--log-level=</option><replaceable class="option">log_level</replaceable></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>
+ <arg choice="plain">--create-db</arg>
+ <arg choice="opt"><option>--var-dir=</option><replaceable class="option">var_directory</replaceable></arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+ <arg choice="plain">--generate-config</arg>
+ <arg choice="opt"><option>…</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="plain">
+ <arg choice="req">
<group choice="req">
<arg choice="plain"><option>-h</option></arg>
<arg choice="plain"><option>--help</option></arg>
</group>
+ <arg choice="plain"><option>--version</option></arg>
</arg>
- <arg choice="plain"><option>--version</option></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
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>
+ configuration see <xref linkend="configuration"/>. See also environment
+ variables special case for MPD host and port in <xref linkend="environment"/>.
+ </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=/run/mpd-sima.pid --log=/var/log/mpd-sima.log</command></para>
+ <para><command>&dhpackage; --daemon --conf=/etc/mpd_sima.cfg --var-dir=/var/cache/mpd-sima/ --pid=/run/mpd-sima.pid --log=/var/log/mpd-sima.log</command></para>
</refsect2>
<refsect2 id="user_land">
<title>Launch in user land</title>
<para>Verbosity in [debug,info,warning,error].<sbr />Default is to log info messages.</para>
</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry><!-- config -->
<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>
+ <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>.<sbr />
+ CLI option overrides any equivalent mentioned in configuration file, ie. launching &dhutils; with '<option>--port</option>' CLI option will ignore port setting in configuration file.<sbr />
+ For more details on configuration file cf.
+ <citerefentry><refentrytitle>mpd_sima.cfg</refentrytitle>
+ <manvolnum>5</manvolnum></citerefentry>, see also <xref linkend="files"/>.<sbr />
+ </para>
</listitem>
</varlistentry>
- <varlistentry> <!-- var_dir -->
- <term><option>--var_dir=<replaceable class="parameter">var_directory</replaceable></option></term>
+ <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> <!-- generate-config -->
+ <term><option>--generate-config</option></term>
+ <listitem>
+ <para>Generate a sample configuration file according to the current configuration. You can put other options with this one to get them in the generated configuration.</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>
+ <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 -->
</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>
+ <xi:include href="files.xml" />
<refsect1 id="environment">
<title>ENVIRONMENT</title>
<variablelist>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><envar>HTTP_PROXY</envar>, <envar>HTTPS_PROXY</envar></term>
+ <listitem>
+ <para>&dhutils; honors <envar>HTTP_PROXY</envar> environment variables.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1 id="configuration">
<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
+ <filename>doc/examples/</filename>. On Debian
system please look in
<filename>/usr/share/doc/&dhpackage;</filename>.</para>
</listitem>
<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>
+ <para>The get the defaults as detected by &dhpackage; on your system you can run &dhpackage; to print the config:</para>
+ <para><command>&dhpackage; --generate-config</command></para>
</listitem>
</varlistentry>
</variablelist>
- </refsect1>
- <xi:include href="feedback.xml" />
- <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>For details about mpd_sima.cfg refer to the manual
+ <citerefentry>
+ <refentrytitle>mpd_sima.cfg</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry>
</para>
</refsect1>
+ <xi:include href="feedback.xml" />
+ <xi:include href="seealso.xml" />
</refentry>