From: kaliko Date: Sat, 9 Mar 2024 16:34:20 +0000 (+0100) Subject: Improved documentation X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=baa907b0e0378dd0ed09f6e1202f5ed605f3f344;p=python-musicpdaio.git Improved documentation --- diff --git a/README.rst b/README.rst index a243c88..05d8184 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,7 @@ An asynchronous MPD (Music Player Daemon) client library written in Python. ---- +:Documentation: https://musicplayerdaemon.codeberg.page/python-musicpdaio/ :MPD Protocol: https://www.musicpd.org/doc/html/protocol.html :Code: https://codeberg.org/MusicPlayerDaemon/python-musicpdaio.git :Dependencies: None diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index c39c502..b3b0d9e 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -3,8 +3,5 @@ Changelog `Semantic Versioning`_. is used. -Unreleased ----------- - - -.. _Semantic Versioning: https://semver.org/spec/v2.0.0.html +|version| Unreleased +-------------------- diff --git a/doc/source/conf.py b/doc/source/conf.py index 6377b03..c0f2a05 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -5,11 +5,18 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os +import sys + +sys.path.insert(0, os.path.abspath('../../')) +from mpdaio.const import VERSION project = 'musicpdaio' copyright = '2024, kaliko' author = 'kaliko' -release = '0.0.1' + +version = VERSION +release = VERSION # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -29,11 +36,24 @@ exclude_patterns = [] html_theme = 'alabaster' html_static_path = ['_static'] +html_baseurl= 'https://musicplayerdaemon.codeberg.page/python-musicpdaio/' html_theme_options = { 'page_width' : '1024px', 'fixed_sidebar': 'true', + 'base_bg': '#eee', + 'pre_bg': '#fff', } +rst_epilog = """ +.. _asyncio: https://docs.python.org/3/library/asyncio.html +.. _Diátaxis: https://diataxis.fr/ +.. _MPD protocol documentation: http://www.musicpd.org/doc/protocol/ +.. _python-musicpd: https://kaliko.gitlab.io/python-musicpd +.. _Semantic Versioning: https://semver.org/spec/v2.0.0.html +.. _snake case: https://en.wikipedia.org/wiki/Snake_case + +""" + # -- Options for intersphinx extension --------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration diff --git a/doc/source/explanations.rst b/doc/source/explanations.rst index 15155a0..b3d4fbb 100644 --- a/doc/source/explanations.rst +++ b/doc/source/explanations.rst @@ -90,10 +90,4 @@ connection is still in use a new connection is made and kept in the pool. await client.ping() # A connection is made and kept open client.connections # Returns a list; [Connection] - -.. _snake case: https://en.wikipedia.org/wiki/Snake_case -.. _MPD protocol documentation: http://www.musicpd.org/doc/protocol/ -.. _asyncio: https://docs.python.org/3/library/asyncio.html -.. _python-musicpd: https://kaliko.gitlab.io/python-musicpd - .. vim: spell spelllang=en diff --git a/doc/source/index.rst b/doc/source/index.rst index 5b5a51b..1ae2764 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,5 +1,5 @@ -Welcome to musicpdaio's documentation! -====================================== +musicpdaio's documentation +========================== The documentation is structured by following the `Diátaxis`_ principles: tutorials and explanation are mainly useful to discover and learn, howtos and @@ -18,12 +18,9 @@ have some specific action to perform or goal to achieve. changelog - Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` - -.. _Diátaxis: https://diataxis.fr/ diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 95e6948..b0280d7 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -91,6 +91,4 @@ Concurrency .. literalinclude:: tutorial/tutorial-01.py - -.. _MPD protocol documentation: http://www.musicpd.org/doc/protocol/ .. vim: spell spelllang=en diff --git a/mpdaio/const.py b/mpdaio/const.py index 6781184..35d86c6 100644 --- a/mpdaio/const.py +++ b/mpdaio/const.py @@ -7,7 +7,7 @@ ERROR_PREFIX = 'ACK ' SUCCESS = 'OK' NEXT = 'list_OK' #: Module version -VERSION = '0.1.b0' +VERSION = '0.1.0b0' #: Seconds before a connection attempt times out #: (overriden by :envvar:`MPD_TIMEOUT` env. var.) CONNECTION_TIMEOUT = 30