1 .. include:: ../../README.rst
6 **Latest stable release** from `PyPi <https://pypi.org/project/python-musicpd/>`_:
10 pip install python-musicpd
12 **Latest development version** using pip + git:
16 pip install git+https://gitlab.com/kaliko/python-musicpd.git
21 Here is a snippet allowing to list the last modified artists in the media library:
25 #!/usr/bin/env python3
30 cli = musicpd.MPDClient()
32 # Gets files count in the library
33 nb_files = int(cli.stats()['songs'])
34 # Gets the last 100 files modified
35 files = cli.search('file', '', 'sort', 'Last-Modified', 'window', (nb_files-100,))
36 # Print last modified artists in media library
37 print(' / '.join({f.get('albumartist') for f in files}))
41 if __name__ == '__main__':
51 git clone https://gitlab.com/kaliko/python-musicpd.git && cd python-musicpd
52 # Installs sphinx if needed
53 python3 -m venv venv && . ./venv/bin/activate
56 python3 setup.py build_sphinx
58 sphinx-build -d ./doc/build/doctrees doc/source -b html ./doc/build/html
81 .. vim: spell spelllang=en