<year>2015</year>
<year>2016</year>
<year>2017</year>
+ <year>2018</year>
+ <year>2019</year>
<holder>&dhusername;</holder>
</copyright>
<legalnotice>
.\" Title: mpd-sima
.\" Author: Jack Kaliko <kaliko@azylum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/21/2017
+.\" Date: 03/19/2019
.\" Manual: mpd-sima 0.15.0 User Manual
.\" Source: mpd-sima
.\" Language: English
.\"
-.TH "MPD\-SIMA" "1" "11/21/2017" "mpd-sima" "mpd-sima 0.15.0 User Manual"
+.TH "MPD\-SIMA" "1" "03/19/2019" "mpd-sima" "mpd-sima 0.15.0 User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RE
.SH "COPYRIGHT"
.br
-Copyright \(co 2009-2017 Jack Kaliko
+Copyright \(co 2009-2019 Jack Kaliko
.br
.PP
This manual page was written for the Debian system (and may be used by others)\&.
--- /dev/null
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>mpd-sima</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>mpd-sima — mpd-sima will try to maintain some titles ahead in the queue following different policies.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">mpd-sima</code> [<code class="option">--daemon</code>] [<code class="option">--config=</code><em class="replaceable"><code>conf_file</code></em>] [<code class="option">--var-dir=</code><em class="replaceable"><code>var_directory</code></em>] [<code class="option">--pid=</code><em class="replaceable"><code>pid_file</code></em>] [<code class="option">--log=</code><em class="replaceable"><code>log_file</code></em>] [<code class="option">--log-level=</code><em class="replaceable"><code>log_level</code></em>] [<code class="option">--host=</code><em class="replaceable"><code>mpd_host</code></em>] [<code class="option">--mpd_port=</code><em class="replaceable"><code>mpd_port</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">mpd-sima</code> --create-db [<code class="option">--var-dir=</code><em class="replaceable"><code>var_directory</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">mpd-sima</code> --generate-config [<code class="option">…</code>]</p></div><div class="cmdsynopsis"><p><code class="command">mpd-sima</code> {
+ { <code class="option">-h</code> | <code class="option">--help</code> }
+ <code class="option">--version</code>
+ } </p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>This manual page documents briefly the
+ <span class="command"><strong>mpd-sima</strong></span> commands.</p><p>At start up default configuration is first overridden by user
+ configuration in mpd_sima.cfg (see <a class="xref" href="#files" title="FILES">the section called “FILES”</a>) 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 <span class="command"><strong>-S my_mpd_server</strong></span> option. For default
+ configuration see <a class="xref" href="#configuration" title="CONFIGURATION">the section called “CONFIGURATION”</a>. See also environment
+ variables special case for MPD host and port in <a class="xref" href="#environment" title="ENVIRONMENT">the section called “ENVIRONMENT”</a>.
+ </p></div><div class="refsect1"><a name="example"></a><h2>EXAMPLE</h2><div class="refsect2"><a name="daemon"></a><h3>Launch as a system service (dæmon).</h3><p>Here follows an example on how to launch mpd-sima as a service on your system, not attach to regular user configuration/database.</p><p><span class="command"><strong>mpd-sima --daemon --conf=/etc/mpd_sima.cfg --var-dir=/var/cache/mpd-sima/ --pid=/run/mpd-sima.pid --log=/var/log/mpd-sima.log</strong></span></p></div><div class="refsect2"><a name="user_land"></a><h3>Launch in user land</h3><p>Launching mpd-sima from/whithin your user account is easy, you can simply call <span class="command"><strong>mpd-sima</strong></span> from your shell or one of the following command:</p><p>Background execution (dæmonise), log in the specified file, save pid:</p><p><span class="command"><strong>mpd-sima --daemon --pid=$HOME/var/run/mpd-sima.pid --log=$HOME/var/log/mpd-sima.log</strong></span></p><p>Foreground execution, connect <span class="emphasis"><em>my.mpd.server.org</em></span>, log to std(out|err):</p><p><span class="command"><strong>mpd-sima --host=my.mpd.server.org</strong></span></p></div></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>The program follows the usual GNU command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help and exit.</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>Print version and exit.</p></dd><dt><span class="term"><code class="option">--daemon</code></span></dt><dd><p>Start as a daemon. Log redirected to /dev/null, usually setting <code class="option">--log</code> and <code class="option">--pid</code> options in daemon mode are a good idea to monitor/stop the process.</p></dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>pid_file</code></em></code>, </span><span class="term"><code class="option">--pid=<em class="replaceable"><code>pid_file</code></em></code></span></dt><dd><p>Use the specific file <em class="replaceable"><code>pid_file</code></em> to store pid to.<br>Default is not to store pid info.</p></dd><dt><span class="term"><code class="option">-l <em class="replaceable"><code>log_file</code></em></code>, </span><span class="term"><code class="option">--log=<em class="replaceable"><code>log_file</code></em></code></span></dt><dd><p>Use the specific file <em class="replaceable"><code>log_file</code></em> to log messages to.<br>Default is to log to stdout/stderr.</p></dd><dt><span class="term"><code class="option">-v <em class="replaceable"><code>log_level</code></em></code>, </span><span class="term"><code class="option">--log-level=<em class="replaceable"><code>log_level</code></em></code></span></dt><dd><p>Verbosity in [debug,info,warning,error].<br>Default is to log info messages.</p></dd><dt><span class="term"><code class="option">-c <em class="replaceable"><code>conf_file</code></em></code>, </span><span class="term"><code class="option">--config=<em class="replaceable"><code>conf_file</code></em></code></span></dt><dd><p>Use the specific file <em class="replaceable"><code>conf_file</code></em> to set up
+ configuration instead of looking for the default user
+ configuration file.<br>Default is to look for
+ <code class="envar">$XDG_CONFIG_HOME/mpd_sima/mpd_sima.cfg</code>.<br>
+ CLI option overrides any equivalent mentioned in configuration file, ie. launching mpd-sima with '<code class="option">--port</code>' CLI option will ignore port setting in configuration file.<br>
+ For more details on configuration file cf.
+ <span class="citerefentry"><span class="refentrytitle">mpd_sima.cfg</span>(5)</span>, see also <a class="xref" href="#files" title="FILES">the section called “FILES”</a>.<br>
+ </p></dd><dt><span class="term"><code class="option">--var-dir=<em class="replaceable"><code>var_directory</code></em></code></span></dt><dd><p>Use the specific path <em class="replaceable"><code>var_directory</code></em> to look for (or create) var files (ie. database) instead of looking at the default user data location.<br>Default is to look in <code class="envar">$XDG_DATA_HOME/mpd_sima/</code>. Concerning <code class="envar">$XDG_DATA_HOME</code> see also <a class="xref" href="#files" title="FILES">the section called “FILES”</a></p></dd><dt><span class="term"><code class="option">--generate-config</code></span></dt><dd><p>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.</p></dd><dt><span class="term"><code class="option">--create-db</code></span></dt><dd><p>Create the database and exit. Uses folder specified with <code class="option">--var-dir</code> or default directory.<br>Default is to use <code class="envar">$XDG_DATA_HOME/mpd_sima/</code>. Concerning <code class="envar">$XDG_DATA_HOME</code> see also <a class="xref" href="#files" title="FILES">the section called “FILES”</a></p></dd><dt><span class="term"><code class="option">-S <em class="replaceable"><code>mpd_host</code></em></code>, </span><span class="term"><code class="option">--host=<em class="replaceable"><code>mpd_host</code></em></code></span></dt><dd><p>Use the specific host <em class="replaceable"><code>mpd_host</code></em> as MPD server.<br><em class="replaceable"><code>mpd_host</code></em> can be an <acronym class="acronym">IP</acronym> or a fully qualified domain name as long as your system can resolve it. This overrides <code class="envar">MPD_HOST</code> environment variable.<br>Default is <span class="emphasis"><em>localhost</em></span>.</p><p>See also <a class="xref" href="#environment" title="ENVIRONMENT">the section called “ENVIRONMENT”</a>.</p></dd><dt><span class="term"><code class="option">-P <em class="replaceable"><code>mpd_port</code></em></code>, </span><span class="term"><code class="option">--port=<em class="replaceable"><code>mpd_port</code></em></code></span></dt><dd><p>Use the specific port number <em class="replaceable"><code>mpd_port</code></em> on MPD server. This overrides <code class="envar">MPD_PORT</code> environment variable.<br>Default is <span class="emphasis"><em>6600</em></span>.</p><p>See also <a class="xref" href="#environment" title="ENVIRONMENT">the section called “ENVIRONMENT”</a></p></dd></dl></div></div><div class="refsect1"><a name="files"></a><h2>FILES</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">${XDG_CONFIG_HOME}/mpd_sima/mpd_sima.cfg</code></span></dt><dd><p>Configuration file.</p></dd><dt><span class="term"><code class="filename">${XDG_DATA_HOME}/mpd_sima/sima.db</code></span></dt><dd><p>SQLite DB file.</p></dd><dt><span class="term"><code class="filename">${XDG_DATA_HOME}/mpd_sima/WEB_SERVICE/</code></span></dt><dd><p>Persistent http cache.</p></dd></dl></div><p>Usually <code class="envar">XDG_DATA_HOME</code> is set to
+ <code class="filename">${HOME}/.local/share</code> and <code class="envar">XDG_CONFIG_HOME</code> to
+ <code class="filename">${HOME}/.config</code>.<br>You may override them using
+ command line option <code class="option">--var-dir</code> and <code class="option">--config</code> (cf.
+ <span class="citerefentry"><span class="refentrytitle">mpd-sima</span>(1)</span>)</p></div><div class="refsect1"><a name="environment"></a><h2>ENVIRONMENT</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="envar">MPD_HOST</code>, <code class="envar">MPD_PORT</code></span></dt><dd><p>mpd-sima will look for <code class="envar">MPD_HOST</code> and
+ <code class="envar">MPD_PORT</code> to override built-in configuration
+ (set to "localhost:6600").</p><p>mpd-sima expects <code class="envar">MPD_HOST</code> syntax as documented in mpc manual,
+ cf. <span class="citerefentry"><span class="refentrytitle">mpc</span>(1)</span>.
+ <br>To use a password, provide a value of the form "password@host".
+ </p></dd><dt><span class="term"><code class="envar">HTTP_PROXY</code>, <code class="envar">HTTPS_PROXY</code></span></dt><dd><p>mpd-sima honors <code class="envar">HTTP_PROXY</code> environment variables.</p></dd></dl></div></div><div class="refsect1"><a name="configuration"></a><h2>CONFIGURATION</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">mpd_sima.cfg</code></span></dt><dd><p><code class="filename">mpd_sima.cfg</code> is read if present.
+ Otherwise built-in defaults are used. An example should be
+ provided in the tarball within
+ <code class="filename">doc/examples/</code>. On Debian
+ system please look in
+ <code class="filename">/usr/share/doc/mpd-sima</code>.</p></dd><dt><span class="term">DEFAULTS</span></dt><dd><p>Default is to look for MPD server at localhost:6600 (or MPD_HOST/MPD_PORT env. var. if set).</p><p>The get the defaults as detected by mpd-sima on your system you can run mpd-sima to print the config:</p><p><span class="command"><strong>mpd-sima --generate-config</strong></span></p></dd></dl></div><p>For details about mpd_sima.cfg refer to the manual
+ <span class="citerefentry"><span class="refentrytitle">mpd_sima.cfg</span>(5)</span>
+ </p></div><div class="refsect1"><a name="feedback"></a><h2>FEEDBACK/BUGS</h2><p>The maintainer would be more than happy to ear from you, don't hesitate to send feedback, <a class="ulink" href="http://kaliko.me/id/" target="_top">http://kaliko.me/id/</a>.</p><p><acronym class="acronym">XMPP</acronym> users are welcome to join the dedicated chat room at <a class="ulink" href="kaliko.me@conf.azylum.org" target="_top">kaliko.me@conf.azylum.org</a>.</p></div><div class="refsect1"><a name="see_also"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">mpc</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">mpd</span>(1)</span></p><p>
+ <code class="filename">/usr/share/doc/mpd-sima/</code>
+ </p></div></div></body></html>
.\" Title: mpd_sima.cfg
.\" Author: Jack Kaliko <kaliko@azylum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 08/29/2018
+.\" Date: 03/19/2019
.\" Manual: mpd-sima 0.15.0 User Manual
.\" Source: mpd-sima
.\" Language: English
.\"
-.TH "MPD_SIMA\&.CFG" "5" "08/29/2018" "mpd-sima" "mpd-sima 0.15.0 User Manual"
+.TH "MPD_SIMA\&.CFG" "5" "03/19/2019" "mpd-sima" "mpd-sima 0.15.0 User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RE
.SH "COPYRIGHT"
.br
-Copyright \(co 2009-2017 Jack Kaliko
+Copyright \(co 2009-2019 Jack Kaliko
.br
.PP
This manual page was written for the Debian system (and may be used by others)\&.
--- /dev/null
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>mpd_sima.cfg</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>mpd_sima.cfg — mpd-sima will try to maintain some titles ahead in the queue
+ following different policies. This manual document the
+ configuration file for mpd-sima.</p></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>This manual page documents briefly <span class="command"><strong>mpd-sima</strong></span>
+ configuration options available in user configuration file
+ (see <a class="xref" href="#files" title="FILES">the section called “FILES”</a>).</p></div><div class="refsect1"><a name="examples"></a><h2>EXAMPLES</h2><div class="refsect2"><a name="album"></a><h3>Album queue mode.</h3><p>Here is an example of album queue configuration.</p><pre class="programlisting">[MPD]
+host=example.org
+port=8000
+
+[sima]
+history_duration=48 # 2 days
+queue_length=5
+
+[lastfm]
+queue_mode=album
+album_to_add=2
+
+[crop]
+# keep 30 played tracks in playlist
+consume=30
+
+ </pre></div></div><div class="refsect1"><a name="options"></a><h2>Configuration file</h2><p>The configuration file consists of sections, led by a
+ <span class="command"><strong>[section]</strong></span> header and followed by <code class="option">name: value</code>
+ entries, with continuations in the style of RFC 822 (see section
+ 3.1.1, “LONG HEADER FIELDS”); <code class="option">name=value</code> is also accepted. Lines
+ beginning with <em class="parameter"><code>'#'</code></em> or <em class="parameter"><code>';'</code></em>
+ are ignored and may be used to provide comments (<span class="emphasis"><em>Nota
+ Bene:</em></span> inline comment are possible using <em class="parameter"><code>'#'</code></em>).</p><p>The default values are used in the options lists below.</p><div class="refsect2"><a name="MPD"></a><h3>MPD section</h3><p>This section is meant to configure MPD access, MPD host
+ address / port and password if necessary.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">[MPD]</code></span></dt><dd></dd><dt><span class="term"><code class="option">host=</code><em class="replaceable"><code>localhost</code></em></span></dt><dd><p>Set MPD host. Use IP or FQDN.</p></dd><dt><span class="term"><code class="option">port=</code><em class="replaceable"><code>6600</code></em></span></dt><dd><p>Set host port to access MPD to.</p></dd><dt><span class="term"><code class="option">password=</code><em class="replaceable"><code>s3cr3t</code></em></span></dt><dd><p>Set MPD password to use. Do not use this option
+ if you don't have enabled password protected access
+ on your MPD server.</p></dd></dl></div></div><div class="refsect2"><a name="log"></a><h3>log section</h3><p>Configure logging.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">[log]</code></span></dt><dd><p></p></dd><dt><span class="term"><code class="option">logfile=</code></span></dt><dd><p>File to log to, usually in dæmon mode.<br>Defaut
+ (empty or unset) is to log to stdin/stdout.</p></dd><dt><span class="term"><code class="option">verbosity=</code><em class="replaceable"><code>info</code></em></span></dt><dd><p>Logging verbosity among
+ <em class="replaceable"><code>debug</code></em>,
+ <em class="replaceable"><code>info</code></em>,
+ <em class="replaceable"><code>warning</code></em>,
+ <em class="replaceable"><code>error</code></em>.</p></dd></dl></div></div><div class="refsect2"><a name="daemon"></a><h3>Process daemonization</h3><p>Configure process daemon.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">[daemon]</code></span></dt><dd><p></p></dd><dt><span class="term"><code class="option">daemon=false</code></span></dt><dd><p>whether to daemonize process or not.</p></dd><dt><span class="term"><code class="option">pidfile=</code></span></dt><dd><p>Where to store process ID.</p></dd></dl></div></div><div class="refsect2"><a name="sima"></a><h3>sima section</h3><p>Core mpd_sima.cfg configuration.</p><div class="variablelist"><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">contrib=</code><em class="replaceable"><code></code></em></span></dt><dd><p></p></dd><dt><span class="term"><code class="option">internal=</code><em class="replaceable"><code>Lastfm, Random, Crop</code></em></span></dt><dd><p>mpd-sima's plugin management for internal source plugin
+ and contrib (ie. external plugins).<br> Plugins list is a
+ comma separated string list.<br> Optional plugin's
+ configuration lays in its own section.<br>For instance a
+ "AwesomePlugin" declared here gets its configuration from the
+ corresponding section "[awesomeplugin]".
+ </p><p>The default list of plugins to load at startup: <code class="option">Lastfm</code>,<code class="option">Random</code>,<code class="option">Crop</code>.<br>
+ <code class="option">Crop</code> is an utility plugin, it does not queue any tracks (cf. below).<br>
+ <code class="option">Random</code> will queue a track at random if other plugins did not return any tracks.<br>
+ </p><p>You can add here as many plugins you want,
+ currently shipping <code class="option">Lastfm</code> only.<br>
+ The priority may be used to order them.
+ </p></dd><dt><span class="term"><code class="option">history_duration=</code><em class="replaceable"><code>8</code></em></span></dt><dd><p>How far to look back in history to avoid to play
+ twice the same track/title (duration in
+ hours).<br>
+ The <code class="option">history_duration</code> is also used to give priority to not recently played artists.
+ </p></dd><dt><span class="term"><code class="option">queue_length=</code><em class="replaceable"><code>2</code></em></span></dt><dd><p>Threshold value triggering queue process.</p></dd><dt><span class="term"><code class="option">musicbrainzid=</code><em class="replaceable"><code>true</code></em></span></dt><dd><p>Use MusicBrainzIdentifier to search music (mainly
+ for artists).
+ Default is True, switch to False if you don't have
+ MusicBrainzIdentifier set for at least 80% of you
+ music library.<br> Consider using these metadata as it
+ enhances a lot artist/album/tracks identification.
+ Use Picard to tag your file: <a class="ulink" href="https://picard.musicbrainz.org/" target="_top">https://picard.musicbrainz.org/</a>.
+ </p></dd><dt><span class="term"><code class="option">repeat_disable_queue=</code><em class="replaceable"><code>true</code></em></span></dt><dd><p>Prevent disabling queuing in repeat play mode.
+ </p></dd><dt><span class="term"><code class="option">single_disable_queue=</code><em class="replaceable"><code>true</code></em></span></dt><dd><p>Prevent disabling queuing in single play mode.
+ </p></dd></dl></div><dl class="variablelist"><dt><span class="term"><code class="option">[sima]</code></span></dt><dd><p></p></dd></dl></div></div><div class="refsect2"><a name="crop"></a><h3>Crop section</h3><p>crop plugin's configuration:</p><dt><span class="term"><code class="option">[crop]</code></span></dt><dd></dd><dt><span class="term"><code class="option">consume=</code><em class="replaceable"><code>10</code></em></span></dt><dd><p>How many played tracks to keep in the queue.
+ Allows you to maintain a fixed length queue.
+ Set to some negative integer to keep all played tracks.
+ </p></dd><dt><span class="term"><code class="option">priority=</code><em class="replaceable"><code>10</code></em></span></dt><dd><p>
+ Plugin priority
+ </p></dd></div><div class="refsect2"><a name="random"></a><h3>Random section</h3><p>Random plugin's configuration:</p><dt><span class="term"><code class="option">[random]</code></span></dt><dd></dd><dt><span class="term"><code class="option">flavour=</code><em class="replaceable"><code>sensible</code></em></span></dt><dd><p>When no similar tracks are found, falling back to
+ random queuing. Different mode, aka random flavour,
+ are available:
+ <em class="replaceable"><code>pure</code></em>,
+ <em class="replaceable"><code>sensible</code></em>,
+ <em class="replaceable"><code>genre</code></em>.
+ </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: bullet; "><li class="listitem" style="list-style-type: disc"><p><em class="replaceable"><code>pure</code></em>, pure random choice, even among recently played track.
+ </p></li><li class="listitem" style="list-style-type: disc"><p><em class="replaceable"><code>sensible</code></em>, use play history to filter chosen tracks.
+ </p></li><li class="listitem" style="list-style-type: disc"><p><em class="replaceable"><code>genre</code></em>, Not implemented yet.
+ </p></li></ul></div><p>
+ </p></dd><dt><span class="term"><code class="option">priority=</code><em class="replaceable"><code>50</code></em></span></dt><dd><p>
+ Plugin priority
+ </p></dd></div><div class="refsect2"><a name="lastfm"></a><h3>LastFm section</h3><p>LastFM plugin's configuration.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">[lastfm]</code></span></dt><dd></dd><dt><span class="term"><code class="option">queue_mode=</code><em class="replaceable"><code>track</code></em></span></dt><dd><p>Queue mode to use among
+ <em class="replaceable"><code>track</code></em>,
+ <em class="replaceable"><code>top</code></em> and
+ <em class="replaceable"><code>album</code></em> (see <a class="xref" href="#queue_mode" title="QUEUE MODES">the section called “QUEUE MODES”</a> for info about queue modes).</p></dd><dt><span class="term"><code class="option">max_art=</code><em class="replaceable"><code>10</code></em></span></dt><dd><p>Number of similar artist to retrieve from local
+ media library.<br>When set to something superior
+ to zero, it tries to get as much similar artists
+ from media library.</p></dd><dt><span class="term"><code class="option">depth=</code><em class="replaceable"><code>1</code></em></span></dt><dd><p>How many artists to base on similar artists
+ search.<br> The first is the last played artist
+ and so on back in the history. Highter depth
+ generates wider suggestions, it might help to
+ reduce looping over same artists.
+ </p></dd><dt><span class="term"><code class="option">single_album=</code><em class="replaceable"><code>false</code></em></span></dt><dd><p>Prevent from queueing a track from the same album
+ (it often happens with OST).<br>
+ Only relevant in "track" queue mode.</p></dd><dt><span class="term"><code class="option">track_to_add=</code><em class="replaceable"><code>1</code></em></span></dt><dd><p>How many track(s) to add. Only relevant in
+ <code class="option">top</code> and <code class="option">track</code>
+ queue modes.</p></dd><dt><span class="term"><code class="option">album_to_add=</code><em class="replaceable"><code>1</code></em></span></dt><dd><p>How many album(s) to add. Only relevant in
+ <code class="option">album</code> queue modes.</p></dd><dt><span class="term"><code class="option">cache=</code><em class="replaceable"><code>True</code></em></span></dt><dd><p>Whether or not to use on-disk persistent http
+ cache.<br>When set to "true", sima will use a
+ persistent cache for its http client. The cache is
+ written along with the dbfile in:<br>
+ <code class="filename">$XDG_CONFIG_HOME/mpd_sima/http/WEB_SERVICE</code>.<br>
+ If set to "false", caching is still done but in memory.
+ </p></dd><dt><span class="term"><code class="option">priority=</code><em class="replaceable"><code>100</code></em></span></dt><dd><p>
+ Plugin priority
+ </p></dd></dl></div></div></div><div class="refsect1"><a name="queue_mode"></a><h2>QUEUE MODES</h2><p>mpd-sima offers different queue modes. All of them pick up
+ tracks from artists similar to the last track in the queue.</p><p>mpd-sima tries preferably to chose among unplayed artists or
+ at least not recently played artist. Concerning track and album
+ queue modes titles are chosen purely at random among unplayed
+ tracks.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">track</code></span></dt><dd><p>Queue a similar track chosen at random from a similar artist.</p></dd><dt><span class="term"><code class="option">top</code></span></dt><dd><p>Queue a track from a similar artist, chosen among
+ "top tracks" according to last.fm data mining.</p></dd><dt><span class="term"><code class="option">album</code></span></dt><dd><p>Queue a whole album chosen at random from a similar artist.</p><p><span class="emphasis"><em>Nota Bene:</em></span><br> Due to the
+ track point of view of database build upon tracks tags
+ an album lookup for a specific artist will return
+ albums as soon as this artist appears in a single track
+ of the album.<br>
+ For instance looking for album from "The Velvet
+ Underground" will fetch "Last Days" and "Juno" OSTs
+ because the band appears on the soundtrack of these two
+ movies.<br>
+ A solution is for you to set AlbumArtists tag to
+ something different than the actual artist of the
+ track. For compilations, OSTs etc. a strong convention
+ is to use "Various Artists" for this tag.</p><p>mpd-sima is currently looking for AlbumArtists tags
+ and avoid album where this tag is set with "Various
+ Artists". If a single track within an album is found
+ with AlbumArtists:"Various Artists" the complete album
+ is skipped and won't be queued.</p></dd></dl></div></div><div class="refsect1"><a name="files"></a><h2>FILES</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">${XDG_CONFIG_HOME}/mpd_sima/mpd_sima.cfg</code></span></dt><dd><p>Configuration file.</p></dd><dt><span class="term"><code class="filename">${XDG_DATA_HOME}/mpd_sima/sima.db</code></span></dt><dd><p>SQLite DB file.</p></dd><dt><span class="term"><code class="filename">${XDG_DATA_HOME}/mpd_sima/WEB_SERVICE/</code></span></dt><dd><p>Persistent http cache.</p></dd></dl></div><p>Usually <code class="envar">XDG_DATA_HOME</code> is set to
+ <code class="filename">${HOME}/.local/share</code> and <code class="envar">XDG_CONFIG_HOME</code> to
+ <code class="filename">${HOME}/.config</code>.<br>You may override them using
+ command line option <code class="option">--var-dir</code> and <code class="option">--config</code> (cf.
+ <span class="citerefentry"><span class="refentrytitle">mpd-sima</span>(1)</span>)</p></div><div class="refsect1"><a name="feedback"></a><h2>FEEDBACK/BUGS</h2><p>The maintainer would be more than happy to ear from you, don't hesitate to send feedback, <a class="ulink" href="http://kaliko.me/id/" target="_top">http://kaliko.me/id/</a>.</p><p><acronym class="acronym">XMPP</acronym> users are welcome to join the dedicated chat room at <a class="ulink" href="kaliko.me@conf.azylum.org" target="_top">kaliko.me@conf.azylum.org</a>.</p></div><div class="refsect1"><a name="see_also"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">mpc</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">mpd</span>(1)</span></p><p>
+ <code class="filename">/usr/share/doc/mpd-sima/</code>
+ </p></div></div></body></html>
.\" Title: simadb_cli
.\" Author: Jack Kaliko <kaliko@azylum.org>
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 11/21/2017
+.\" Date: 03/19/2019
.\" Manual: mpd-sima 0.15.0 User Manual
.\" Source: mpd-sima
.\" Language: English
.\"
-.TH "SIMADB_CLI" "1" "11/21/2017" "mpd-sima" "mpd-sima 0.15.0 User Manual"
+.TH "SIMADB_CLI" "1" "03/19/2019" "mpd-sima" "mpd-sima 0.15.0 User Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RE
.SH "COPYRIGHT"
.br
-Copyright \(co 2009-2017 Jack Kaliko
+Copyright \(co 2009-2019 Jack Kaliko
.br
.PP
This manual page was written for the Debian system (and may be used by others)\&.
--- /dev/null
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>simadb_cli</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="idm1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>simadb_cli — simadb_cli is a command line interface editor for the sima user DB.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> <code class="option">--remove_artist=</code><em class="replaceable"><code>artist</code></em> [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ] [
+ <code class="option">--reciprocal</code>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> <code class="option">--purge_hist</code> [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> <code class="option">--view_all</code> [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> { <code class="option">--bl_curr_trk</code> | <code class="option">--bl_curr_art</code> | <code class="option">--bl_curr_alb</code> | <code class="option">--bl_art=</code><em class="replaceable"><code>artist_name</code></em> } [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ] [
+ <code class="option">--host=</code><em class="replaceable"><code>mpd_host</code></em>
+ ] [
+ <code class="option">--port=</code><em class="replaceable"><code>mpd_port</code></em>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> <code class="option">--remove_bl=</code><em class="replaceable"><code>row_id</code></em> [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> <code class="option">--view_bl</code> [
+ <code class="option">--dbfile=</code><em class="replaceable"><code>db_file</code></em>
+ ]</p></div><div class="cmdsynopsis"><p><code class="command">simadb_cli</code> {
+ { <code class="option">-h</code> | <code class="option">--help</code> }
+ | <code class="option">--version</code> }</p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p>This manual page documents briefly the
+ <span class="command"><strong>simadb_cli</strong></span> commands.</p><p>simadb_cli is a command line interface to get and edit users
+ blacklist database used with MPD_sima. The default
+ database file (see <a class="xref" href="#files" title="FILES">the section called “FILES”</a>) can be overridden if
+ you want.</p></div><div class="refsect1"><a name="example"></a><h2>EXAMPLE</h2><div class="refsect2"><a name="blacklist"></a><h3>Black list edition</h3><p><span class="emphasis"><em>Adding to black list.</em></span> You can add a single
+ track, an album or an artist to the black list. The element to
+ black list is chosen from the currently playing track. Use
+ <code class="option">--bl_curr_trk</code> to prevent simadb_cli to queue this
+ track, <code class="option">--bl_curr_alb</code> or <code class="option">--bl_curr_art</code> respectively for the album and the
+ artist.
+ </p><p>Remember you need access to your MPD server to retrieve
+ information to black list. Defaults are localhost:6600 or found in
+ environment variables but you may set it up from command
+ line:
+ </p><p><span class="command"><strong>simadb_cli --bl_curr_art -S mympd.example.org</strong></span></p><p>
+ <span class="emphasis"><em>To black list a specific artist</em></span> (not
+ currently playing) you can use <code class="option">--bl_ar="Artist name to black list"</code>.
+ </p></div></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>The program follows the usual GNU command line syntax,
+ with long options starting with two dashes ("-"). A summary of
+ options is included below.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span></dt><dd><p>Print help and exit.</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>Print version and exit.</p></dd><dt><span class="term"><code class="option">--bl_art=<em class="replaceable"><code>artist_name</code></em></code></span></dt><dd><p>Use to black list <em class="replaceable"><code>artist_name</code></em>. simadb_cli is checking <em class="replaceable"><code>artist_name</code></em> is actually in MPD music library (cf <code class="option">-S</code> and <code class="option">-P</code> options to set MPD host/address if necessary).</p><p>If <em class="replaceable"><code>artist_name</code></em> is not found the script print out a list of matching artists.</p></dd><dt><span class="term"><code class="option">--bl_curr_trk</code> | <code class="option">--bl_curr_art</code> | <code class="option">--bl_curr_alb</code></span></dt><dd><p>Use to black list the currently playing track|artist|album. You need access to your MPD server, use <code class="option">-S</code> and <code class="option">-P</code> to set MPD host/address if necessary.</p></dd><dt><span class="term"><code class="option">-d <em class="replaceable"><code>db_file</code></em></code>, </span><span class="term"><code class="option">--dbfile=<em class="replaceable"><code>db_file</code></em></code></span></dt><dd><p>Use the specific file <em class="replaceable"><code>db_file</code></em> as database.<br>Default is too use <code class="envar">XDG_DATA_HOME</code> (see <a class="xref" href="#files" title="FILES">the section called “FILES”</a>).</p></dd><dt><span class="term"><code class="option">--purge_hist</code></span></dt><dd><p>Purge history, you may supply an alternative DB file with --dbfile option.</p></dd><dt><span class="term"><code class="option">--remove_bl=<em class="replaceable"><code>row_id</code></em></code></span></dt><dd><p>Use to remove a black list entry. To get the row_id to suppress use <code class="option">--view_bl</code> option.</p></dd><dt><span class="term"><code class="option">--view_bl</code></span></dt><dd><p>Get all entries in the black list.</p></dd><dt><span class="term"><code class="option">-P <em class="replaceable"><code>mpd_port</code></em></code>, </span><span class="term"><code class="option">--port=<em class="replaceable"><code>mpd_port</code></em></code></span></dt><dd><p>Use the specific port number <em class="replaceable"><code>mpd_port</code></em> on MPD server. This overrides <code class="envar">MPD_PORT</code> environment variable.<br>Default is <span class="emphasis"><em>6600</em></span>.</p></dd><dt><span class="term"><code class="option">-S <em class="replaceable"><code>mpd_host</code></em></code>, </span><span class="term"><code class="option">--host=<em class="replaceable"><code>mpd_host</code></em></code></span></dt><dd><p>Use the specific host <em class="replaceable"><code>mpd_host</code></em> as MPD server.<br><em class="replaceable"><code>mpd_host</code></em> can be an <acronym class="acronym">IP</acronym> or a fully qualified domain name as long as your system can resolve it. This overrides <code class="envar">MPD_HOST</code> environment variable.<br>Default is <span class="emphasis"><em>localhost</em></span>.</p></dd></dl></div></div><div class="refsect1"><a name="files"></a><h2>FILES</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">${XDG_DATA_HOME}/mpd_sima/sima.db</code></span></dt><dd><p>SQLite DB file. Usually <code class="envar">XDG_DATA_HOME</code> is set to <code class="filename">${HOME}/.local/share</code>.</p></dd></dl></div></div><div class="refsect1"><a name="feedback"></a><h2>FEEDBACK/BUGS</h2><p>The maintainer would be more than happy to ear from you, don't hesitate to send feedback, <a class="ulink" href="http://kaliko.me/id/" target="_top">http://kaliko.me/id/</a>.</p><p><acronym class="acronym">XMPP</acronym> users are welcome to join the dedicated chat room at <a class="ulink" href="kaliko.me@conf.azylum.org" target="_top">kaliko.me@conf.azylum.org</a>.</p></div><div class="refsect1"><a name="see_also"></a><h2>SEE ALSO</h2><p><span class="citerefentry"><span class="refentrytitle">mpc</span>(1)</span>, <span class="citerefentry"><span class="refentrytitle">mpd</span>(1)</span></p><p>
+ <code class="filename">/usr/share/doc/mpd-sima/</code>
+ </p></div></div></body></html>
Use the boolean option "mopidy_compat" in the sima section
cf. https://gitlab.com/kaliko/sima/issues/21#
--- kaliko jack <kaliko@azylum.org> UNRELEASED
+-- kaliko jack <kaliko@azylum.org> Tue, 19 Mar 2019 13:58:49 +0100
MPD_sima v0.14.4
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
]
setup(name='MPD_sima',
url='http://kaliko.me/code/mpd-sima',
description='Automagically add titles to MPD playlist',
author=AUTHOR,
- author_email= EMAIL,
+ author_email=EMAIL,
license='GPLv3',
keywords='MPD',
long_description=DESCRIPTION,
'console_scripts': ['mpd-sima = sima.launch:main',]
},
test_suite="tests",
-)
+ )
# VIM MODLINE
# vim: ai ts=4 sw=4 sts=4 expandtab
from .lib.daemon import Daemon
from .utils.utils import SigHup
+
class Sima(Daemon):
"""Main class, plugin and player management
"""