From: Kaliko Jack Date: Fri, 15 Nov 2013 19:28:47 +0000 (+0100) Subject: Fixed documentation X-Git-Tag: v0.4.0~4 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=d28bd57ddc3465db4fcaa540fe7cb3de53f8be6b;p=python-musicpd.git Fixed documentation --- diff --git a/MANIFEST.in b/MANIFEST.in index 066ee11..3305050 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ exclude setup.cfg -include *.txt +include *.txt README.rst recursive-include doc *.txt diff --git a/README.txt b/README.rst similarity index 71% rename from README.txt rename to README.rst index e6a2e31..a926514 100644 --- a/README.txt +++ b/README.rst @@ -34,12 +34,12 @@ Using the client library The client library can be used as follows:: ->>> client = mpd.MPDClient() # create client object ->>> client.connect("localhost", 6600) # connect to localhost:6600 ->>> print client.mpd_version # print the mpd version ->>> print client.cmd("one", 2) # print result of the command "cmd one 2" ->>> client.close() # send the close command ->>> client.disconnect() # disconnect from the server + client = musicpd.MPDClient() # create client object + client.connect('localhost', 6600) # connect to localhost:6600 + print client.mpd_version # print the mpd version + print client.cmd('one', 2) # print result of the command "cmd one 2" + client.close() # send the close command + client.disconnect() # disconnect from the server A list of supported commands, their arguments (as MPD currently understands them), and the functions used to parse their responses can be found in @@ -49,18 +49,18 @@ details. Command lists are also supported using `command_list_ok_begin()` and `command_list_end()` :: ->>> client.command_list_ok_begin() # start a command list ->>> client.update() # insert the update command into the list ->>> client.status() # insert the status command into the list ->>> results = client.command_list_end() # results will be a list with the results + client.command_list_ok_begin() # start a command list + client.update() # insert the update command into the list + client.status() # insert the status command into the list + results = client.command_list_end() # results will be a list with the results Commands may also return iterators instead of lists if `iterate` is set to `True`:: ->>> client.iterate = True ->>> for song in client.playlistinfo(): ->>> print song["file"] + client.iterate = True + for song in client.playlistinfo(): + print song['file'] Contacting authors diff --git a/setup.py b/setup.py index 81c1276..18e0007 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ An MPD (Music Player Daemon) client library written in pure Python.\ """ -with open('README.txt') as file: +with open('README.rst') as file: LONG_DESCRIPTION = file.read() CLASSIFIERS = [