docs: Use :confval: to make config docs linkable

This commit is contained in:
Stein Magnus Jodal 2013-04-09 00:22:24 +02:00
parent 2cd0fdc571
commit 09a38d9523
10 changed files with 164 additions and 91 deletions

View File

@ -8,8 +8,8 @@ None
**Configuration**
If this wasn't the default, you would set the ``audio/mixer`` config value to
``autoaudiomixer`` to use this mixer.
If this wasn't the default, you would set the :confval:`audio/mixer` config
value to ``autoaudiomixer`` to use this mixer.
"""
from __future__ import unicode_literals

View File

@ -6,7 +6,7 @@ None
**Configuration**
Set the ``audio/mixer`` config value to ``fakemixer`` to use this mixer.
Set the :confval:`audio/mixe:` config value to ``fakemixer`` to use this mixer.
"""
from __future__ import unicode_literals

View File

@ -9,8 +9,9 @@ serial cable.
**Configuration**
Set the ``audio/mixer`` config value to ``nadmixer`` to use it. You probably
also needs to add some properties to the ``audio/mixer`` config value.
Set the :confval:`audio/mixer` config value to ``nadmixer`` to use it. You
probably also needs to add some properties to the :confval:`audio/mixer` config
value.
Supported properties includes:

View File

@ -7,17 +7,9 @@ from mopidy.utils import config, formatting
default_config = """
[local]
# If the local extension should be enabled or not
enabled = true
# Path to directory with local media files
media_dir = $XDG_MUSIC_DIR
# Path to playlists directory with m3u files for local media
playlists_dir = $XDG_DATA_DIR/mopidy/playlists
# Path to tag cache for local media
tag_cache_file = $XDG_DATA_DIR/mopidy/tag_cache
"""
@ -36,6 +28,24 @@ https://github.com/mopidy/mopidy/issues?labels=Local+backend
None
**Configuration**
.. confval:: local/enabled
If the local extension should be enabled or not.
.. confval:: local/media_dir
Path to directory with local media files.
.. confval:: local/playlists_dir
Path to playlists directory with m3u files for local media.
.. confval:: local/tag_cache_file
Path to tag cache for local media.
**Default config**
.. code-block:: ini

View File

@ -8,23 +8,11 @@ from mopidy.utils import config, formatting
default_config = """
[spotify]
# If the Spotify extension should be enabled or not
enabled = true
# Your Spotify Premium username
username =
# Your Spotify Premium password
password =
# The preferred audio bitrate. Valid values are 96, 160, 320
bitrate = 160
# Max number of seconds to wait for Spotify operations to complete
timeout = 10
# Path to the Spotify data cache. Cannot be shared with other Spotify apps
cache_dir = $XDG_CACHE_DIR/mopidy/spotify
"""
@ -52,6 +40,32 @@ https://github.com/mopidy/mopidy/issues?labels=Spotify+backend
.. literalinclude:: ../../../requirements/spotify.txt
**Configuration**
.. confval:: spotify/enabled
If the Spotify extension should be enabled or not.
.. confval:: spotify/username
Your Spotify Premium username.
.. confval:: spotify/password
Your Spotify Premium password.
.. confval:: spotify/bitrate
The preferred audio bitrate. Valid values are 96, 160, 320.
.. confval:: spotify/timeout
Max number of seconds to wait for Spotify operations to complete.
.. confval:: spotify/cache_dir
Path to the Spotify data cache. Cannot be shared with other Spotify apps.
**Default config**
.. code-block:: ini

View File

@ -7,11 +7,7 @@ from mopidy.utils import config, formatting
default_config = """
[stream]
# If the stream extension should be enabled or not
enabled = true
# Whitelist of URI schemas to support streaming from
protocols =
http
https
@ -21,10 +17,12 @@ protocols =
rtsp
"""
__doc__ = """A backend for playing music for streaming music.
__doc__ = """
A backend for playing music for streaming music.
This backend will handle streaming of URIs matching the ``stream/protocols``
config value, assuming the needed GStreamer plugins are installed.
This backend will handle streaming of URIs matching the
:confval:`stream/protocols` config value, assuming the needed GStreamer plugins
are installed.
**Issues**
@ -34,6 +32,16 @@ https://github.com/mopidy/mopidy/issues?labels=Stream+backend
None
**Configuration**
.. confval:: stream/enabled
If the stream extension should be enabled or not.
.. confval:: stream/protocols
Whitelist of URI schemas to allow streaming from.
**Default config**
.. code-block:: ini

View File

@ -7,29 +7,9 @@ from mopidy.utils import config, formatting
default_config = """
[http]
# If the HTTP extension should be enabled or not
enabled = true
# Which address the HTTP server should bind to
#
# 127.0.0.1
# Listens only on the IPv4 loopback interface
# ::1
# Listens only on the IPv6 loopback interface
# 0.0.0.0
# Listens on all IPv4 interfaces
# ::
# Listens on all interfaces, both IPv4 and IPv6
hostname = 127.0.0.1
# Which TCP port the HTTP server should listen to
port = 6680
# Which directory the HTTP server should serve at "/"
#
# Change this to have Mopidy serve e.g. files for your JavaScript client.
# "/mopidy" will continue to work as usual even if you change this setting.
static_dir =
[logging.levels]
@ -48,6 +28,36 @@ https://github.com/mopidy/mopidy/issues?labels=HTTP+frontend
.. literalinclude:: ../../../requirements/http.txt
**Configuration**
.. confval:: http/enabled
If the HTTP extension should be enabled or not.
.. confval:: http/hostname
Which address the HTTP server should bind to.
``127.0.0.1``
Listens only on the IPv4 loopback interface
``::1``
Listens only on the IPv6 loopback interface
``0.0.0.0``
Listens on all IPv4 interfaces
``::``
Listens on all interfaces, both IPv4 and IPv6
.. confval:: http/port
Which TCP port the HTTP server should listen to.
.. confval:: http/static_dir
Which directory the HTTP server should serve at "/"
Change this to have Mopidy serve e.g. files for your JavaScript client.
"/mopidy" will continue to work as usual even if you change this setting.
**Default config**
.. code-block:: ini
@ -61,13 +71,13 @@ Setup
The frontend is enabled by default if all dependencies are available.
When it is enabled it starts a web server at the port specified by the
``http/port`` config value.
:confval:`http/port` config value.
.. warning:: Security
As a simple security measure, the web server is by default only available
from localhost. To make it available from other computers, change the
``http/hostname`` config value. Before you do so, note that the HTTP
:confval:`http/hostname` config value. Before you do so, note that the HTTP
frontend does not feature any form of user authentication or authorization.
Anyone able to access the web server can use the full core API of Mopidy.
Thus, you probably only want to make the web server available from your
@ -405,7 +415,8 @@ Example to get started with
2. Create an empty directory for your web client.
3. Change the ``http/static_dir`` config value to point to your new directory.
3. Change the :confval:`http/static_dir` config value to point to your new
directory.
4. Start/restart Mopidy.

View File

@ -7,33 +7,11 @@ from mopidy.utils import config, formatting
default_config = """
[mpd]
# If the MPD extension should be enabled or not
enabled = true
# Which address the MPD server should bind to
#
# 127.0.0.1
# Listens only on the IPv4 loopback interface
# ::1
# Listens only on the IPv6 loopback interface
# 0.0.0.0
# Listens on all IPv4 interfaces
# ::
# Listens on all interfaces, both IPv4 and IPv6
hostname = 127.0.0.1
# Which TCP port the MPD server should listen to
port = 6600
# The password required for connecting to the MPD server
password =
# The maximum number of concurrent connections the MPD server will accept
max_connections = 20
# Number of seconds an MPD client can stay inactive before the connection is
# closed by the server
connection_timeout = 60
"""
@ -51,6 +29,43 @@ https://github.com/mopidy/mopidy/issues?labels=MPD+frontend
None
**Configuration**
.. confval:: mpd/enabled
If the MPD extension should be enabled or not.
.. confval:: mpd/hostname
Which address the MPD server should bind to.
``127.0.0.1``
Listens only on the IPv4 loopback interface
``::1``
Listens only on the IPv6 loopback interface
``0.0.0.0``
Listens on all IPv4 interfaces
``::``
Listens on all interfaces, both IPv4 and IPv6
.. confval:: mpd/port
Which TCP port the MPD server should listen to.
.. confval:: mpd/password
The password required for connecting to the MPD server. If blank, no
password is required.
.. confval:: mpd/max_connections
The maximum number of concurrent connections the MPD server will accept.
.. confval:: mpd/connection_timeout
Number of seconds an MPD client can stay inactive before the connection is
closed by the server.
**Default config**
.. code-block:: ini

View File

@ -7,11 +7,7 @@ from mopidy.utils import formatting, config
default_config = """
[mpris]
# If the MPRIS extension should be enabled or not
enabled = true
# Location of the Mopidy .desktop file
desktop_file = /usr/share/applications/mopidy.desktop
"""
@ -33,8 +29,18 @@ An example of an MPRIS client is the `Ubuntu Sound Menu
Ubuntu/Debian.
- An ``.desktop`` file for Mopidy installed at the path set in the
``mpris/desktop_file`` config value. See :ref:`install-desktop-file` for
details.
:confval:`mpris/desktop_file` config value. See :ref:`install-desktop-file`
for details.
**Configuration**
.. confval:: mpris/enabled
If the MPRIS extension should be enabled or not.
.. confval:: mpris/desktop_file
Location of the Mopidy ``.desktop`` file.
**Default config**

View File

@ -7,20 +7,14 @@ from mopidy.utils import config, formatting
default_config = """
[scrobbler]
# If the Last.fm extension should be enabled or not
enabled = true
# Your Last.fm username
username =
# Your Last.fm password
password =
"""
__doc__ = """
Frontend which scrobbles the music you play to your `Last.fm
<http://www.last.fm>`_ profile.
Frontend which scrobbles the music you play to your
`Last.fm <http://www.last.fm>`_ profile.
.. note::
@ -30,6 +24,20 @@ Frontend which scrobbles the music you play to your `Last.fm
.. literalinclude:: ../../../requirements/scrobbler.txt
**Configuration**
.. confval:: scrobbler/enabled
If the scrobbler extension should be enabled or not.
.. confval:: scrobbler/username
Your Last.fm username.
.. confval:: scrobbler/password
Your Last.fm password.
**Default config**
.. code-block:: ini