[Pkg-mpd-commits] [python-mpd] 232/262: Added note about async commands to command reference doc
Simon McVittie
smcv at debian.org
Sun May 22 18:16:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch upstream
in repository python-mpd.
commit d1f177834a032c348528c3757ee734fe785401e5
Author: Danilo Bargen <mail at dbrgn.ch>
Date: Sun Feb 2 14:14:00 2014 +0100
Added note about async commands to command reference doc
fixes #34
---
doc/commands_header.txt | 8 ++++++++
doc/generate_command_reference.py | 10 ++++++----
doc/topics/commands.rst | 11 +++++++++++
doc/topics/getting-started.rst | 2 ++
4 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/doc/commands_header.txt b/doc/commands_header.txt
new file mode 100644
index 0000000..bc0a007
--- /dev/null
+++ b/doc/commands_header.txt
@@ -0,0 +1,8 @@
+========
+Commands
+========
+.. note::
+
+ Each command have a *send_* and a *fetch_* variant, which allows to send a
+ MPD command and then fetch the result later. See :ref:`getting-started` for
+ examples and more information.
diff --git a/doc/generate_command_reference.py b/doc/generate_command_reference.py
index becbd5f..9ba2241 100644
--- a/doc/generate_command_reference.py
+++ b/doc/generate_command_reference.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import re, sys
+import os.path
try:
from lxml import etree
except ImportError:
@@ -12,12 +13,13 @@ url = "http://git.musicpd.org/cgit/cirrus/mpd.git/plain/doc/protocol.xml"
if len(sys.argv) > 1:
url += "?id=release-" + sys.argv[1]
-tree = etree.parse(url)
+DIR = os.path.dirname(os.path.realpath(__file__))
+header_file = os.path.join(DIR, "commands_header.txt")
-print("========")
-print("Commands")
-print("========\n")
+with open(header_file, 'r') as f:
+ print(f.read())
+tree = etree.parse(url)
chapter = tree.xpath('/book/chapter/title[text()= "Command reference"]/..')[0]
for section in chapter.xpath("section"):
title = section.xpath("title")[0].text
diff --git a/doc/topics/commands.rst b/doc/topics/commands.rst
index a3b8658..b89e8d2 100644
--- a/doc/topics/commands.rst
+++ b/doc/topics/commands.rst
@@ -1,6 +1,11 @@
========
Commands
========
+.. note::
+
+ Each command have a *send_* and a *fetch_* variant, which allows to send a
+ MPD command and then fetch the result later. See :ref:`getting-started` for
+ examples and more information.
Querying MPD's status
---------------------
@@ -456,6 +461,9 @@ The music database
the list of stored playlists. This behavior is
deprecated; use "listplaylists" instead.
+ This command may be used to list metadata of remote
+ files (e.g. URI beginning with "http://" or "smb://").
+
Clients that are connected via UNIX domain socket may
use this command to read the tags of an arbitrary local
file (URI beginning with "file:///").
@@ -468,6 +476,9 @@ The music database
to the music directory or a URL in the form
"file:///foo/bar.ogg".
+ This command may be used to list metadata of remote
+ files (e.g. URI beginning with "http://" or "smb://").
+
The response consists of lines in the form "KEY: VALUE".
Comments with suspicious characters (e.g. newlines) are
ignored silently.
diff --git a/doc/topics/getting-started.rst b/doc/topics/getting-started.rst
index 5805fea..0f3282d 100644
--- a/doc/topics/getting-started.rst
+++ b/doc/topics/getting-started.rst
@@ -1,3 +1,5 @@
+.. _getting-started:
+
Using the client library
------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list