annotate docs/conf.py @ 789:8ab718cbec22

Use the copyright sign instead of (c) in the docs
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 17 May 2026 13:55:43 +0200
parents 16f040434598
children 830a7536281b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
2 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
3 # Configuration file for the Sphinx documentation builder.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
4 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
5 # This file does only contain a selection of the most common options. For a
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
6 # full list see the documentation:
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
7 # http://www.sphinx-doc.org/en/stable/config
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
8
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
9 # -- Path setup --------------------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
10
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
11 # If extensions (or modules to document with autodoc) are in another directory,
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
12 # add these directories to sys.path here. If the directory is relative to the
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
13 # documentation root, use os.path.abspath to make it absolute, like shown here.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
14 #
163
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
15 import datetime
54
aa8345dae995 Generate readable HTML documentation and an API documentation
Franz Glasner <hg@dom66.de>
parents: 52
diff changeset
16 import os
aa8345dae995 Generate readable HTML documentation and an API documentation
Franz Glasner <hg@dom66.de>
parents: 52
diff changeset
17 import sys
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
18
783
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
19 import sphinx.util.logging
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
20 import sphinx.transforms
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
21
54
aa8345dae995 Generate readable HTML documentation and an API documentation
Franz Glasner <hg@dom66.de>
parents: 52
diff changeset
22 sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
23
57
a3f64253de70 Read the version and release information from the "configmix" package
Franz Glasner <hg@dom66.de>
parents: 55
diff changeset
24 import configmix
154
28164259aa83 FIX: Build docu with Python: remove all warnings
Franz Glasner <hg@dom66.de>
parents: 111
diff changeset
25 from configmix.compat import u
57
a3f64253de70 Read the version and release information from the "configmix" package
Franz Glasner <hg@dom66.de>
parents: 55
diff changeset
26
715
0c73d95ec454 Need Sphinx >= 5.1 now for building the documentation
Franz Glasner <fzglas.hg@dom66.de>
parents: 709
diff changeset
27 needs_sphinx = "5.1"
716
26a6c218a66a - Document the optional module configmix._speedups somewhat
Franz Glasner <fzglas.hg@dom66.de>
parents: 715
diff changeset
28 primary_domain = "py"
715
0c73d95ec454 Need Sphinx >= 5.1 now for building the documentation
Franz Glasner <fzglas.hg@dom66.de>
parents: 709
diff changeset
29
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
30
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
31 # -- Project information -----------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
32
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
33 project = 'ConfigMix'
789
8ab718cbec22 Use the copyright sign instead of (c) in the docs
Franz Glasner <fzglas.hg@dom66.de>
parents: 784
diff changeset
34 copyright = u('2015–2023 Franz Glasner')
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
35 author = 'Franz Glasner'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
36
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
37 current_date = datetime.date.today().isoformat()
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
38
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
39 # The full version, including alpha/beta/rc tags
57
a3f64253de70 Read the version and release information from the "configmix" package
Franz Glasner <hg@dom66.de>
parents: 55
diff changeset
40 release = configmix.__version__
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
41 # The short X.Y version
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
42 version = '.'.join(release.split('.')[:2])
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
43
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
44 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
45 # Optimistically assume that all keywords are expanded properly everywhere:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
46 # do not define special VCSxxx keyword below.
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
47 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
48 define_rest_keywords = False
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
49
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
50 release_date = today = configmix.__date__
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
51 if (not release_date
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
52 or (release_date.startswith("|") and release_date.endswith("|"))):
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
53 # Above assumption is not true: "hg kwarchive" nay not have been called
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
54 release_date = today = "dev-%s" % (current_date,)
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
55 define_rest_keywords = True
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
56 release_rev = configmix.__revision__
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
57 if (not release_rev
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
58 or (release_rev.startswith("|") and release_rev.endswith("|"))):
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
59 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
60 # Above assumption is not true: "hg kwarchive" may not have been called.
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
61 # Try to determine from VCS.
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
62 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
63 import subprocess
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
64 try:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
65 release_rev = subprocess.check_output(
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
66 ["hg", "id", "-i"], stderr=subprocess.STDOUT)
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
67 except Exception:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
68 release_rev = "<UNKNOWN>"
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
69 else:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
70 if sys.version_info[0] >= 3:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
71 release_rev = release_rev.decode("ascii")
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
72 release_rev = "dev-%s" % (release_rev.strip(),)
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
73 define_rest_keywords = True
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
74 else:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
75 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
76 # Assume that all keywords are expanded properly everywhere:
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
77 # do not define special VCSxxx keyword below.
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
78 #
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
79 define_rest_keywords = False
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
80
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
81 # -- General configuration ---------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
82
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
83 # If your documentation needs a minimal Sphinx version, state it here.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
84 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
85 # needs_sphinx = '1.0'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
86
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
87 # Add any Sphinx extension module names here, as strings. They can be
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
88 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
89 # ones.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
90 extensions = [
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
91 'sphinx.ext.autodoc',
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
92 'sphinx.ext.intersphinx',
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
93 'sphinx.ext.todo',
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
94 'sphinx.ext.ifconfig',
55
51a8fa011659 Don't show RST file sources and don't show python sources
Franz Glasner <hg@dom66.de>
parents: 54
diff changeset
95 # 'sphinx.ext.viewcode',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
96 ]
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
97
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
98 # Add any paths that contain templates here, relative to this directory.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
99 templates_path = ['_templates']
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
100
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
101 # The suffix(es) of source filenames.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
102 # You can specify multiple suffix as a list of string:
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
103 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
104 # source_suffix = ['.rst', '.md']
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
105 source_suffix = '.rst'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
106
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
107 # The master toctree document.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
108 master_doc = 'index'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
109
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
110 # The language for content autogenerated by Sphinx. Refer to documentation
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
111 # for a list of supported languages.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
112 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
113 # This is also used if you do content translation via gettext catalogs.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
114 # Usually you set "language" from the command line for these cases.
67
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
115 language = 'en'
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
116
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
117 # List of patterns, relative to source directory, that match files and
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
118 # directories to ignore when looking for source files.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
119 # This pattern also affects html_static_path and html_extra_path .
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
120 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
121
732
88bfa76463a6 FIX: Make all configurations on conf10.* semantically identical.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 716
diff changeset
122 # `default' is similar to python3
88bfa76463a6 FIX: Make all configurations on conf10.* semantically identical.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 716
diff changeset
123 highlight_language = "default"
88bfa76463a6 FIX: Make all configurations on conf10.* semantically identical.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 716
diff changeset
124
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
125 # The name of the Pygments (syntax highlighting) style to use.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
126 pygments_style = 'sphinx'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
127
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
128
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
129 # -- Options for HTML output -------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
130
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
131 # The theme to use for HTML and HTML Help pages. See the documentation for
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
132 # a list of builtin themes.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
133 #
60
6c5e44dc74db Use the "haiku" theme instead of "alabaster" for the mosly API documentation
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
134 #html_theme = 'alabaster'
6c5e44dc74db Use the "haiku" theme instead of "alabaster" for the mosly API documentation
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
135 html_theme = 'haiku'
159
f7114e4f3938 Adjust the HTML title for the "haiku" theme
Franz Glasner <fzglas.hg@dom66.de>
parents: 156
diff changeset
136 # for the Haiku title
f7114e4f3938 Adjust the HTML title for the "haiku" theme
Franz Glasner <fzglas.hg@dom66.de>
parents: 156
diff changeset
137 html_short_title = u("%s %s") % (project, release)
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
138 html_last_updated_fmt = "%s (rev %s)" % (current_date, release_rev)
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
139
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
140 # Theme options are theme-specific and customize the look and feel of a theme
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
141 # further. For a list of options available for each theme, see the
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
142 # documentation.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
143 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
144 # html_theme_options = {}
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
145
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
146 # Add any paths that contain custom static files (such as style sheets) here,
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
147 # relative to this directory. They are copied after the builtin static files,
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
148 # so a file named "default.css" will overwrite the builtin "default.css".
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
149 html_static_path = ['_static']
709
115de6fe420e Add a custom CSS file to use text-align "left" instead of the Haiku standard "justify"
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 673
diff changeset
150 html_css_files = ["custom-haiku.css"]
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
151
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
152 # Custom sidebar templates, must be a dictionary that maps document names
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
153 # to template names.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
154 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
155 # The default sidebars (for documents that don't match any pattern) are
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
156 # defined by theme itself. Builtin themes are using these templates by
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
157 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
158 # 'searchbox.html']``.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
159 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
160 # html_sidebars = {}
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
161
770
1f076d7c721d Docs: do not copy sources
Franz Glasner <fzglas.hg@dom66.de>
parents: 732
diff changeset
162 html_copy_source = False
55
51a8fa011659 Don't show RST file sources and don't show python sources
Franz Glasner <hg@dom66.de>
parents: 54
diff changeset
163 html_show_sourcelink = False
51a8fa011659 Don't show RST file sources and don't show python sources
Franz Glasner <hg@dom66.de>
parents: 54
diff changeset
164
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
165
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
166 # -- Options for HTMLHelp output ---------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
167
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
168 # Output file base name for HTML help builder.
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
169 htmlhelp_basename = 'ConfigMixdoc'
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
170
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
171
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
172 # -- Options for LaTeX output ------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
173
771
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
174 latex_engine = 'lualatex'
772
4c44b64e32cd FIX: "xindy" is not available on FreeBSD yet
Franz Glasner <fzglas.hg@dom66.de>
parents: 771
diff changeset
175 latex_use_xindy = False # xindy not found on FreeBSD
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
176 latex_elements = {
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
177 # The paper size ('letterpaper' or 'a4paper').
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
178 #
67
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
179 'papersize': 'a4paper',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
180
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
181 # The font size ('10pt', '11pt' or '12pt').
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
182 #
83
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
183 'pointsize': '11pt',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
184
771
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
185 'babel': r'\usepackage{babel}',
776
48deafc1fd2f Use the new implementations of my-doc-fonts.sty and my-doc-style.sty.
Franz Glasner <fzglas.hg@dom66.de>
parents: 773
diff changeset
186 'preamble': r'\usepackage[stdtitle=false]{my-doc-style}',
48deafc1fd2f Use the new implementations of my-doc-fonts.sty and my-doc-style.sty.
Franz Glasner <fzglas.hg@dom66.de>
parents: 773
diff changeset
187 'maketitle': r'\builddate{%s}\vcsrevision{%s}\sphinxmaketitle' \
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
188 % (current_date, release_rev),
776
48deafc1fd2f Use the new implementations of my-doc-fonts.sty and my-doc-style.sty.
Franz Glasner <fzglas.hg@dom66.de>
parents: 773
diff changeset
189 'fontpkg': r'\usepackage[fonts=charter]{my-doc-fonts}',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
190
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
191 # Latex figure (float) alignment
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
192 #
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
193 # 'figure_align': 'htbp',
67
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
194 # Use "Version" instead of "Release" on the title
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
195 'releasename': 'Version',
771
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
196
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
197 'fncychap': r'\usepackage[Sonny]{fncychap}',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
198 }
771
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
199 latex_additional_files = [
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
200 "_latex/my-doc-fonts.sty",
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
201 "_latex/my-doc-style.sty",
771
741ebfe77e55 Build the PDF documentation with lualatex now.
Franz Glasner <fzglas.hg@dom66.de>
parents: 770
diff changeset
202 ]
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
203
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
204 # Grouping the document tree into LaTeX files. List of tuples
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
205 # (source start file, target name, title,
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
206 # author, documentclass [howto, manual, or own class]).
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
207 latex_documents = [
154
28164259aa83 FIX: Build docu with Python: remove all warnings
Franz Glasner <hg@dom66.de>
parents: 111
diff changeset
208 (master_doc, 'ConfigMix.tex', '"ConfigMix" Documentation',
66
e78f307f81a0 For LaTeX: include documents within the toctree only
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 65
diff changeset
209 'Franz Glasner', 'manual', True),
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
210 ]
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
211
67
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
212 latex_show_urls = 'footnote'
83
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
213 #latex_show_pagerefs = True
67
9d0d9446de08 Annotate LaTeX output with page numbers and show URL targets in the footnotes.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 66
diff changeset
214
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
215
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
216 # -- Options for manual page output ------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
217
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
218 # One entry per manual page. List of tuples
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
219 # (source start file, name, description, authors, manual section).
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
220 man_pages = [
88
5d47693916ee Change title of documentation
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 83
diff changeset
221 (master_doc, 'configmix', '"ConfigMix" Documentation',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
222 [author], 1)
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
223 ]
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
224
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
225
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
226 # -- Options for Texinfo output ----------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
227
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
228 # Grouping the document tree into Texinfo files. List of tuples
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
229 # (source start file, target name, title, author,
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
230 # dir menu entry, description, category)
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
231 texinfo_documents = [
154
28164259aa83 FIX: Build docu with Python: remove all warnings
Franz Glasner <hg@dom66.de>
parents: 111
diff changeset
232 (master_doc, 'ConfigMix', '"ConfigMix" Documentation',
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
233 author, 'ConfigMix', 'One line description of project.',
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
234 'Miscellaneous'),
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
235 ]
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
236
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
237
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
238 # -- Extension configuration -------------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
239
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
240 # -- Options for intersphinx extension ---------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
241
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
242 # Example configuration for intersphinx: refer to the Python standard library.
773
0c3507865bca FIX: Make the "intersphinx_mapping" compatible to Sphinx 8.
Franz Glasner <fzglas.hg@dom66.de>
parents: 772
diff changeset
243 intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
47
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
244
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
245 # -- Options for todo extension ----------------------------------------------
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
246
2ff1e8f02dc7 Running "shinx-quickstart": the automatically generated files as-is
Franz Glasner <hg@dom66.de>
parents:
diff changeset
247 # If true, `todo` and `todoList` produce output, else they produce nothing.
52
6c7f90dbce98 Adjusted the Copyright and change the RCS keywords in accordance with "kwarchive"
Franz Glasner <hg@dom66.de>
parents: 47
diff changeset
248 todo_include_todos = True
94
2b79ddc0f92b Begin a basic introduction chapter
Franz Glasner <hg@dom66.de>
parents: 93
diff changeset
249 # Kein Link auf Pfad und Zeile
2b79ddc0f92b Begin a basic introduction chapter
Franz Glasner <hg@dom66.de>
parents: 93
diff changeset
250 todo_link_only = True
83
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
251
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
252 # -- Options for autodoc -----------------------------------------------------
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
253
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
254 autodoc_member_order = 'bysource'
7d5b4718ac1b Use the fonts Charter, Lato and Inconsolate within LaTeX.
Franz Glasner <hg@dom66.de>
parents: 78
diff changeset
255 autoclass_content = 'both'
91
5ca36fbea43d Created a changelog
Franz Glasner <hg@dom66.de>
parents: 88
diff changeset
256
5ca36fbea43d Created a changelog
Franz Glasner <hg@dom66.de>
parents: 88
diff changeset
257
784
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
258 class IAMCustomSubstitutions(sphinx.transforms.SphinxTransform):
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
259
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
260 """Implement custom variable substitutions"""
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
261
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
262 default_priority = sphinx.transforms.DefaultSubstitutions.default_priority
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
263
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
264 _SUBSTITUTIONS = {
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
265 "release_date": release_date,
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
266 "release_rev": release_rev
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
267 }
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
268 if define_rest_keywords:
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
269 _SUBSTITUTIONS.update(
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
270 {"VCSJustDate": release_date,
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
271 "VCSRevision": release_rev,
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
272 "VCSHGRevision": release_rev})
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
273
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
274 def apply(self):
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
275 from docutils import nodes
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
276 for ref in self.document.traverse(nodes.substitution_reference):
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
277 refname = ref['refname']
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
278 if refname in self._SUBSTITUTIONS:
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
279 stext = self._SUBSTITUTIONS[refname]
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
280 ref.replace_self(nodes.Text(stext, stext))
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
281 #if refname in ('release_date' 'release_rev'):
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
282 # stext = self.config[refname]
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
283 # ref.replace_self(nodes.Text(stext, stext))
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
284
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
285
163
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
286 def setup(app):
783
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
287 logger = sphinx.util.logging.getLogger("conf-setup")
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
288 logger.info("Release: %s", release)
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
289 logger.info("Release Date: %s", release_date)
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
290 logger.info("Release Rev: %s", release_rev)
8151ac02f71d Move all the transforms (|xxx| replacements) from rst_prolog/_epilog to the already existing transform
Franz Glasner <fzglas.hg@dom66.de>
parents: 781
diff changeset
291
163
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
292 #
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
293 # Custom release_date variable with a custom substitution |release_date|
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
294 # and |release_rev|'.
163
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
295 #
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
296 app.add_config_value('release_date', '', 'env')
781
236a1d00b8a6 Some documentation tweaks: sync with other projects
Franz Glasner <fzglas.hg@dom66.de>
parents: 776
diff changeset
297 app.add_config_value('release_rev', '', 'env')
784
16f040434598 Move IAMCustomSubstitutions from function level to module level
Franz Glasner <fzglas.hg@dom66.de>
parents: 783
diff changeset
298 # Custom variable substitution
163
ff03cdf36139 The README.txt should be in the most important parts readable without keyword substitutions.
Franz Glasner <fzglas.hg@dom66.de>
parents: 159
diff changeset
299 app.add_transform(IAMCustomSubstitutions)