diff --git a/docs/Makefile b/docs/Makefile index 02a9d7b..3d37eee 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = -BUILDDIR = build +BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) @@ -15,9 +15,9 @@ endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext diff --git a/docs/source/conf.py b/docs/conf.py similarity index 97% rename from docs/source/conf.py rename to docs/conf.py index d2b1cf6..e770e67 100644 --- a/docs/source/conf.py +++ b/docs/conf.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # Mopidy Touchscreen documentation build configuration file, created by -# sphinx-quickstart on Tue May 19 21:55:21 2015. +# sphinx-quickstart on Tue May 19 23:33:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. @@ -31,7 +31,6 @@ import shlex # ones. extensions = [ 'sphinx.ext.autodoc', - 'sphinx.ext.coverage', ] # Add any paths that contain templates here, relative to this directory. @@ -58,9 +57,9 @@ author = u'9and3r' # built documents. # # The short X.Y version. -version = '4.0.0' +version = '0.4.0' # The full version, including alpha/beta/rc tags. -release = '4.0.0' +release = '0.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -77,7 +76,7 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = [] +exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. @@ -286,4 +285,8 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False -os.path.abspath('../mopidy-touchscreen') +import sphinx_rtd_theme + +html_theme = "sphinx_rtd_theme" + +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] diff --git a/docs/how_to_install.rst b/docs/how_to_install.rst new file mode 100644 index 0000000..b9c1f7d --- /dev/null +++ b/docs/how_to_install.rst @@ -0,0 +1,7 @@ +************** +How to install +************** + +.. image:: https://img.shields.io/pypi/v/Mopidy-Touchscreen.svg?style=flat + :target: https://pypi.python.org/pypi/Mopidy-Touchscreen/ + :alt: Latest PyPI version \ No newline at end of file diff --git a/docs/source/index.rst b/docs/index.rst similarity index 96% rename from docs/source/index.rst rename to docs/index.rst index b80b82e..062f21a 100644 --- a/docs/source/index.rst +++ b/docs/index.rst @@ -195,19 +195,10 @@ v0.2.0 (2014-08-02) - First working version -Contents: - + + .. toctree:: :maxdepth: 2 - -.. automodule:: screens - -.. autoclass:: BaseScreen - :members: - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + + how_to_install + source_code/index diff --git a/docs/make.bat b/docs/make.bat index 708aacf..bdef525 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -5,9 +5,9 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set BUILDDIR=build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source -set I18NSPHINXOPTS=%SPHINXOPTS% source +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% diff --git a/docs/source/modules.rst b/docs/source/modules.rst deleted file mode 100644 index 7d85217..0000000 --- a/docs/source/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -. -= - -.. toctree:: - :maxdepth: 4 - - mopidy_touchscreen diff --git a/docs/source/mopidy_touchscreen.graphic_utils.rst b/docs/source/mopidy_touchscreen.graphic_utils.rst deleted file mode 100644 index b4c8e61..0000000 --- a/docs/source/mopidy_touchscreen.graphic_utils.rst +++ /dev/null @@ -1,38 +0,0 @@ -mopidy_touchscreen.graphic_utils package -======================================== - -Submodules ----------- - -mopidy_touchscreen.graphic_utils.background_manager module ----------------------------------------------------------- - -.. automodule:: mopidy_touchscreen.graphic_utils.background_manager - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.graphic_utils.list_view module -------------------------------------------------- - -.. automodule:: mopidy_touchscreen.graphic_utils.list_view - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.graphic_utils.screen_objects module ------------------------------------------------------- - -.. automodule:: mopidy_touchscreen.graphic_utils.screen_objects - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: mopidy_touchscreen.graphic_utils - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/mopidy_touchscreen.input.rst b/docs/source/mopidy_touchscreen.input.rst deleted file mode 100644 index 4ffd7e4..0000000 --- a/docs/source/mopidy_touchscreen.input.rst +++ /dev/null @@ -1,30 +0,0 @@ -mopidy_touchscreen.input package -================================ - -Submodules ----------- - -mopidy_touchscreen.input.gpio_inpput_manager module ---------------------------------------------------- - -.. automodule:: mopidy_touchscreen.input.gpio_inpput_manager - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.input.input_manager module ---------------------------------------------- - -.. automodule:: mopidy_touchscreen.input.input_manager - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: mopidy_touchscreen.input - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/mopidy_touchscreen.rst b/docs/source/mopidy_touchscreen.rst deleted file mode 100644 index e60f9cc..0000000 --- a/docs/source/mopidy_touchscreen.rst +++ /dev/null @@ -1,39 +0,0 @@ -mopidy_touchscreen package -========================== - -Subpackages ------------ - -.. toctree:: - - mopidy_touchscreen.graphic_utils - mopidy_touchscreen.input - mopidy_touchscreen.screens - -Submodules ----------- - -mopidy_touchscreen.screen_manager module ----------------------------------------- - -.. automodule:: mopidy_touchscreen.screen_manager - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.touch_screen module --------------------------------------- - -.. automodule:: mopidy_touchscreen.touch_screen - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: mopidy_touchscreen - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/mopidy_touchscreen.screens.rst b/docs/source/mopidy_touchscreen.screens.rst deleted file mode 100644 index 53426ab..0000000 --- a/docs/source/mopidy_touchscreen.screens.rst +++ /dev/null @@ -1,78 +0,0 @@ -mopidy_touchscreen.screens package -================================== - -Submodules ----------- - -mopidy_touchscreen.screens.base_screen module ---------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.base_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.keyboard_screen module -------------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.keyboard_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.library_screen module ------------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.library_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.main_screen module ---------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.main_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.menu_screen module ---------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.menu_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.playlist_screen module -------------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.playlist_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.search_screen module ------------------------------------------------ - -.. automodule:: mopidy_touchscreen.screens.search_screen - :members: - :undoc-members: - :show-inheritance: - -mopidy_touchscreen.screens.tracklist module -------------------------------------------- - -.. automodule:: mopidy_touchscreen.screens.tracklist - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: mopidy_touchscreen.screens - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source_code/index.rst b/docs/source_code/index.rst new file mode 100644 index 0000000..1ae890c --- /dev/null +++ b/docs/source_code/index.rst @@ -0,0 +1,8 @@ +********************* +Source Code Reference +********************* + +.. automodule:: mopidy_touchscreen + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/mopidy_touchscreen/screens/base_screen.py b/mopidy_touchscreen/screens/base_screen.py index a3d72a8..2ae16c8 100644 --- a/mopidy_touchscreen/screens/base_screen.py +++ b/mopidy_touchscreen/screens/base_screen.py @@ -11,6 +11,13 @@ class BaseScreen(): self.fonts = fonts def update(self, surface, update_type, rects): + """ + Draw this screen to the surface + + :param surface: + :param update_type: + :param rects: + """ pass def event(self, event):