From 2bf6eb9fe2e7e2acd1ce361dd8276cb8f047f8fe Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 6 Jun 2016 11:37:40 +0100 Subject: docs: Add link to PDF version of docs in sidebar. Requires a link of the form: ///micropython-.pdf --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 6faeb60406..572348c141 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -48,6 +48,9 @@ html_context = { (ver, url_pattern % (ver, micropy_port)) for ver in micropy_all_versions ], + 'downloads':[ + ('PDF', url_pattern % (micropy_version, 'micropython-%s.pdf' % micropy_port)), + ], } -- cgit v1.2.3 From 91031b60dc974ab76159c9c2e2f0ef5c453f88ee Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 12 Jun 2016 01:18:13 +0300 Subject: docs/conf.py: Active sphinx_selective_exclude extensions. For modindex_exclude extension, per-port module excludes are also added. With these changes, it's possible to generate docs for a particular port devoid of any superfluous and unrelated content, including in indexes and full-text search - with small caveat: when generating PDF docs after HTML, or vice-versa cached internal doctree representation (build/*/doctrees/) must be removed first. --- docs/conf.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 572348c141..8fa88022f0 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('.')) # Work out the port to generate the docs for from collections import OrderedDict @@ -71,6 +71,9 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', + 'sphinx_selective_exclude.modindex_exclude', + 'sphinx_selective_exclude.eager_only', + 'sphinx_selective_exclude.search_auto_exclude', ] # Add any paths that contain templates here, relative to this directory. @@ -316,6 +319,20 @@ intersphinx_mapping = {'http://docs.python.org/': None} # Append the other ports' specific folders/files to the exclude pattern exclude_patterns.extend([port + '*' for port in ports if port != micropy_port]) -# Exclude pyb module if the port is the WiPy -if micropy_port == 'wipy': - exclude_patterns.append('library/pyb*') + +modules_port_specific = { + 'pyboard': ['pyb'], + 'wipy': ['wipy'], + 'esp8266': ['esp'], +} + +modindex_exclude = [] + +for p, l in modules_port_specific.items(): + if p != micropy_port: + modindex_exclude += l + +# Exclude extra modules per port +modindex_exclude += { + 'esp8266': ['cmath', 'select'], +}.get(micropy_port, []) -- cgit v1.2.3 From b2641b53e0e9d1c13243f1e73d4255664706403a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 19 Jun 2016 19:17:42 +0300 Subject: docs/conf.py: Exclude cmath from modindex for wipy. --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 8fa88022f0..6f86ea6cdb 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -335,4 +335,5 @@ for p, l in modules_port_specific.items(): # Exclude extra modules per port modindex_exclude += { 'esp8266': ['cmath', 'select'], + 'wipy': ['cmath'], }.get(micropy_port, []) -- cgit v1.2.3 From 1459a8d5c9b29c78da2cf5c7cf3c37ab03b34b8e Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 10 Jul 2016 12:46:50 +0100 Subject: docs: Bump version to 1.8.2. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/conf.py') diff --git a/docs/conf.py b/docs/conf.py index 6f86ea6cdb..ba69cf7f7a 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -99,7 +99,7 @@ copyright = '2014-2016, Damien P. George and contributors' # The short X.Y version. version = '1.8' # The full version, including alpha/beta/rc tags. -release = '1.8.1' +release = '1.8.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.3