1 .. SPDX-FileCopyrightText: 2018-2023 kaliko <kaliko@azylum.org>
2 .. SPDX-License-Identifier: LGPL-3.0-or-later
4 .. include:: ../../README.rst
9 **Latest stable release** from `PyPi <https://pypi.org/project/python-musicpd/>`_:
13 pip install python-musicpd
15 **Latest development version** using pip + git:
19 pip install git+https://gitlab.com/kaliko/python-musicpd.git@dev
24 Here is a snippet allowing to list the last modified artists in the media library:
28 #!/usr/bin/env python3
33 cli = musicpd.MPDClient()
35 # Gets files count in the library
36 nb_files = int(cli.stats()['songs'])
37 # Gets the last 100 files modified
38 files = cli.search('file', '', 'sort', 'Last-Modified', 'window', (nb_files-100,))
39 # Print last modified artists in media library
40 print(' / '.join({f.get('albumartist') for f in files}))
44 if __name__ == '__main__':
54 git clone https://gitlab.com/kaliko/python-musicpd.git && cd python-musicpd
55 # Installs sphinx if needed
56 python3 -m venv venv && . ./venv/bin/activate
59 sphinx-build -d ./doc/build/doctrees doc/source -b html ./doc/build/html
83 .. vim: spell spelllang=en