[Pkg-mpd-commits] [python-mpd] 186/262: Fixes for the documentation
Simon McVittie
smcv at debian.org
Sun May 22 18:16:45 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 02783e7776d7cdb3da341e42ce674df16c35e625
Author: Jörg Thalheim <joerg at higgsboson.tk>
Date: Mon Jan 14 22:39:27 2013 +0100
Fixes for the documentation
---
MANIFEST.in | 3 +-
README.rst | 22 +++++---
doc/commands.rst | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
doc/commands.txt | 111 --------------------------------------
setup.py | 17 +++---
5 files changed, 184 insertions(+), 127 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index 066ee11..6b05c80 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,4 @@
exclude setup.cfg
include *.txt
-recursive-include doc *.txt
+include *.rst
+recursive-include doc *.rst
diff --git a/README.rst b/README.rst
index 3162c83..d3906aa 100644
--- a/README.rst
+++ b/README.rst
@@ -12,7 +12,7 @@ Difference with python-mpd
--------------------------
python-mpd2 is a fork of
-`python-mpd <http://jatreuman.indefero.net/p/python-mpd/>`_.
+`python-mpd`_.
python-mpd2 is a fork of `python-mpd`_. While 0.4.x was backwards compatible
with python-mpd, starting with 0.5 provides enhanced features
which are *NOT* backward compatibles with the original `python-mpd`_ package.
@@ -28,12 +28,11 @@ The following features were added:
- explicitly declared MPD commands (which is handy when using for
example `IPython <http://ipython.org>`_)
- a test suite
-- API documentation to add new commands (see `Future
- Compatible <#future-compatible>`_)
+- API documentation to add new commands (see `Future Compatible`_
- support for Unicode strings in all commands (optionally in python2,
- default in python3 - see `Unicode Handling <#unicode-handling>`_)
+ default in python3 - see `Unicode Handling`_)
- configureable timeouts
-- support for `logging <#logging>`_
+- support for `logging`_
- improved support for sticker
If you like this module, you could try contact the original author
@@ -184,9 +183,16 @@ In order for *MPDClient* to return Unicode strings with Python 2, create
the instance with the ``use_unicode`` parameter set to ``True``.
Using Unicode strings should be prefered as it is done transparently by
-the library for you, and makes the transition to Python 3 easier.
+the library for you, and makes the transition to Python 3 easier::
+
+ >>> import mpd
+ >>> client = MPDClient(use_unicode=True)
+ >>> client.urlhandlers()[0]
+ u'http'
+ >>> client.use_unicode = False # Can be switched back later
+ >>> client.urlhandlers()[0]
+ 'http'
-``python >>> import mpd >>> client = MPDClient(use_unicode=True) >>> client.urlhandlers()[0] u'http' >>> client.use_unicode = False # Can be switched back later >>> client.urlhandlers()[0] 'http'``
Using this option in Python 3 doesn't have any effect.
Logging
@@ -257,3 +263,5 @@ jat at spatialrift.net.
He can also be found idling in #mpd on irc.freenode.net as jat.
.. |Build Status| image:: https://travis-ci.org/Mic92/python-mpd2.png
+
+.. _python-mpd: http://jatreuman.indefero.net/p/python-mpd/
diff --git a/doc/commands.rst b/doc/commands.rst
new file mode 100644
index 0000000..618944e
--- /dev/null
+++ b/doc/commands.rst
@@ -0,0 +1,158 @@
+========
+Commands
+========
+
+Status Commands
+---------------
+
+=========== ======= ================
+clearerror -> fetch_nothing
+currentsong -> fetch_object
+idle [<str>] -> fetch_list
+noidle -> None
+status -> fetch_object
+stats -> fetch_object
+=========== ======= ================
+
+Playback Option Commands
+------------------------
+================== ====== ================
+consume <bool> -> fetch_nothing
+crossfade <int> -> fetch_nothing
+mixrampdb <str> -> fetch_nothing
+mixrampdelay <int> -> fetch_nothing
+random <bool> -> fetch_nothing
+repeat <bool> -> fetch_nothing
+setvol <int> -> fetch_nothing
+single <bool> -> fetch_nothing
+replay_gain_mode <str> -> fetch_nothing
+replay_gain_status -> fetch_item
+================== ====== ================
+
+Playback Control Commands
+-------------------------
+
+======== =========== ================
+next -> fetch_nothing
+pause [<bool>] -> fetch_nothing
+play [<int>] -> fetch_nothing
+playid [<int>] -> fetch_nothing
+previous -> fetch_nothing
+seek <int> <int> -> fetch_nothing
+seekid <int> <int> -> fetch_nothing
+seekcur <int> -> fetch_nothing
+stop -> fetch_nothing
+======== =========== ================
+
+Playlist Commands
+-----------------
+
+============== ============= ================
+add <str> -> fetch_nothing
+addid <str> [<int>] -> fetch_item
+clear -> fetch_nothing
+delete <int> -> fetch_nothing
+deleteid <int> -> fetch_nothing
+move <int> <int> -> fetch_nothing
+moveid <int> <int> -> fetch_nothing
+playlist -> fetch_playlist
+playlistfind <locate> -> fetch_songs
+playlistid [<int>] -> fetch_songs
+playlistinfo [<int>] -> fetch_songs
+playlistsearch <locate> -> fetch_songs
+plchanges <int> -> fetch_songs
+plchangesposid <int> -> fetch_changes
+prio <int> <str> -> fetch_nothing
+prioid <int> <id> -> fetch_nothing
+shuffle [<str>] -> fetch_nothing
+swap <int> <int> -> fetch_nothing
+swapid <int> <int> -> fetch_nothing
+============== ============= ================
+
+Stored Playlist Commands
+------------------------
+
+================ ================= ==================
+listplaylist <str> -> fetch_list
+listplaylistinfo <str> -> fetch_songs
+listplaylists -> fetch_playlists
+load <str> -> fetch_nothing
+playlistadd <str> <str> -> fetch_nothing
+playlistclear <str> -> fetch_nothing
+playlistdelete <str> <int> -> fetch_nothing
+playlistmove <str> <int> <int> -> fetch_nothing
+rename <str> <str> -> fetch_nothing
+rm <str> -> fetch_nothing
+save <str> -> fetch_nothing
+================ ================= ==================
+
+Database Commands
+-----------------
+
+=========== ================ =================
+count <locate> -> fetch_object
+find <locate> -> fetch_songs
+findadd <locate> -> fetch_nothing
+list <str> [<locate>] -> fetch_list
+listall [<str>] -> fetch_database
+listallinfo [<str>] -> fetch_database
+lsinfo [<str>] -> fetch_database
+search <locate> -> fetch_songs
+searchadd <locate> -> fetch_songs
+searchaddpl <str> <locate> -> fetch_songs
+update [<str>] -> fetch_item
+rescan [<str>] -> fetch_item
+=========== ================ =================
+
+Sticker Commands
+----------------
+
+============== ======================= ================
+sticker get <str> <str> <str> -> fetch_item
+sticker set <str> <str> <str> <str> -> fetch_nothing
+sticker delete <str> <str> [<str>] -> fetch_nothing
+sticker list <str> <str> -> fetch_list
+sticker find <str> <str> <str> -> fetch_songs
+============== ======================= ================
+
+Connection Commands
+-------------------
+
+======== ===== ================
+close -> None
+kill -> None
+password <str> -> fetch_nothing
+ping -> fetch_nothing
+======== ===== ================
+
+Audio Output Commands
+---------------------
+
+============= ===== ================
+disableoutput <int> -> fetch_nothing
+enableoutput <int> -> fetch_nothing
+outputs -> fetch_outputs
+============= ===== ================
+
+Reflection Commands
+-------------------
+
+=========== ================
+config -> fetch_item
+commands -> fetch_list
+notcommands -> fetch_list
+tagtypes -> fetch_list
+urlhandlers -> fetch_list
+decoders -> fetch_plugins
+=========== ================
+
+Client To Client
+----------------
+
+=========== =========== =================
+subscribe <str> -> fetch_nothing
+unsubscribe <str> -> fetch_nothing
+channels -> fetch_list
+readmessages -> fetch_messages
+sendmessage <str> <str> -> fetch_nothing
+=========== =========== =================
diff --git a/doc/commands.txt b/doc/commands.txt
deleted file mode 100644
index 97dcea7..0000000
--- a/doc/commands.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-== Status Commands
-clearerror -> fetch_nothing
-currentsong -> fetch_object
-idle [<str>] -> fetch_list
-noidle -> None
-status -> fetch_object
-stats -> fetch_object
-
-== Playback Option Commands
-consume <bool> -> fetch_nothing
-crossfade <int> -> fetch_nothing
-mixrampdb <str> -> fetch_nothing
-mixrampdelay <int> -> fetch_nothing
-random <bool> -> fetch_nothing
-repeat <bool> -> fetch_nothing
-setvol <int> -> fetch_nothing
-single <bool> -> fetch_nothing
-replay_gain_mode <str> -> fetch_nothing
-replay_gain_status -> fetch_item
-
-== Playback Control Commands
-next -> fetch_nothing
-pause [<bool>] -> fetch_nothing
-play [<int>] -> fetch_nothing
-playid [<int>] -> fetch_nothing
-previous -> fetch_nothing
-seek <int> <int> -> fetch_nothing
-seekid <int> <int> -> fetch_nothing
-seekcur <int> -> fetch_nothing
-stop -> fetch_nothing
-
-== Playlist Commands
-add <str> -> fetch_nothing
-addid <str> [<int>] -> fetch_item
-clear -> fetch_nothing
-delete <int> -> fetch_nothing
-deleteid <int> -> fetch_nothing
-move <int> <int> -> fetch_nothing
-moveid <int> <int> -> fetch_nothing
-playlist -> fetch_playlist
-playlistfind <locate> -> fetch_songs
-playlistid [<int>] -> fetch_songs
-playlistinfo [<int>] -> fetch_songs
-playlistsearch <locate> -> fetch_songs
-plchanges <int> -> fetch_songs
-plchangesposid <int> -> fetch_changes
-prio <int> <str> -> fetch_nothing
-prioid <int> <id> -> fetch_nothing
-shuffle [<str>] -> fetch_nothing
-swap <int> <int> -> fetch_nothing
-swapid <int> <int> -> fetch_nothing
-
-== Stored Playlist Commands
-listplaylist <str> -> fetch_list
-listplaylistinfo <str> -> fetch_songs
-listplaylists -> fetch_playlists
-load <str> -> fetch_nothing
-playlistadd <str> <str> -> fetch_nothing
-playlistclear <str> -> fetch_nothing
-playlistdelete <str> <int> -> fetch_nothing
-playlistmove <str> <int> <int> -> fetch_nothing
-rename <str> <str> -> fetch_nothing
-rm <str> -> fetch_nothing
-save <str> -> fetch_nothing
-
-== Database Commands
-count <locate> -> fetch_object
-find <locate> -> fetch_songs
-findadd <locate> -> fetch_nothing
-list <str> [<locate>] -> fetch_list
-listall [<str>] -> fetch_database
-listallinfo [<str>] -> fetch_database
-lsinfo [<str>] -> fetch_database
-search <locate> -> fetch_songs
-searchadd <locate> -> fetch_songs
-searchaddpl <str> <locate> -> fetch_songs
-update [<str>] -> fetch_item
-rescan [<str>] -> fetch_item
-
-== Sticker Commands
-sticker get <str> <str> <str> -> fetch_item
-sticker set <str> <str> <str> <str> -> fetch_nothing
-sticker delete <str> <str> [<str>] -> fetch_nothing
-sticker list <str> <str> -> fetch_list
-sticker find <str> <str> <str> -> fetch_songs
-
-== Connection Commands
-close -> None
-kill -> None
-password <str> -> fetch_nothing
-ping -> fetch_nothing
-
-== Audio Output Commands
-disableoutput <int> -> fetch_nothing
-enableoutput <int> -> fetch_nothing
-outputs -> fetch_outputs
-
-== Reflection Commands
-config -> fetch_item
-commands -> fetch_list
-notcommands -> fetch_list
-tagtypes -> fetch_list
-urlhandlers -> fetch_list
-decoders -> fetch_plugins
-
-== Client To Client
-subscribe <str> -> fetch_nothing
-unsubscribe <str> -> fetch_nothing
-channels -> fetch_list
-readmessages -> fetch_messages
-sendmessage <str> <str> -> fetch_nothing
diff --git a/setup.py b/setup.py
index e6e08a3..06e8d07 100644
--- a/setup.py
+++ b/setup.py
@@ -3,13 +3,9 @@
from distutils.core import setup
from setuptools import Extension
from setuptools.command.test import test as TestCommand
-import sys
+import sys,os
import mpd
-DESCRIPTION = """\
-An MPD (Music Player Daemon) client library written in pure Python.\
-"""
-
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
@@ -48,15 +44,20 @@ class Tox(TestCommand):
errno = tox.cmdline(self.test_args)
sys.exit(errno)
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+VERSION = ".".join(map(str, mpd.VERSION))
+
setup(
name="python-mpd2",
- version=".".join(map(str, mpd.VERSION)),
+ version=VERSION,
description="A Python MPD client library",
- long_description=DESCRIPTION,
+ long_description=read('README.rst'),
author="J. Thalheim",
author_email="jthalheim at gmail.com",
url="https://github.com/Mic92/python-mpd2",
- download_url="https://github.com/Mic92/python-mpd2",
+ download_url="https://github.com/Mic92/python-mpd2/archive/v%s.zip" % VERSION,
py_modules=["mpd"],
classifiers=CLASSIFIERS,
#license=LICENSE,
--
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