source: orange/docs/widgets/rst/conf.py @ 9388:780549f85b9a

Revision 9388:780549f85b9a, 9.8 KB checked in by mitar, 2 years ago (diff)

Updates widgets documentation.

Line 
1# -*- coding: utf-8 -*-
2#
3# widgets documentation build configuration file, created by
4# sphinx-quickstart on Fri Oct  8 15:09:05 2010.
5#
6# This file is execfile()d with the current directory set to its containing dir.
7#
8# Note that not all possible configuration values are present in this
9# autogenerated file.
10#
11# All configuration values have a default; values that are commented out
12# serve to show the default.
13
14import sys, os
15
16# If extensions (or modules to document with autodoc) are in another directory,
17# add these directories to sys.path here. If the directory is relative to the
18# documentation root, use os.path.abspath to make it absolute, like shown here.
19#sys.path.append(os.path.abspath('.'))
20
21# -- General configuration -----------------------------------------------------
22
23# Add any Sphinx extension module names here, as strings. They can be extensions
24# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
25extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.pngmath']
26
27# Add any paths that contain templates here, relative to this directory.
28templates_path = ['_templates']
29
30# The suffix of source filenames.
31source_suffix = '.rst'
32
33# The encoding of source files.
34#source_encoding = 'utf-8'
35
36# The master toctree document.
37master_doc = 'index'
38
39# rst epilog with shortcuts for screen shoot numbers
40rst_epilog = """
41.. |1| image:: /../../sphinx-ext/themes/orange_theme/static/images/1.png
42       :align: middle
43       :alt: 1
44         
45.. |2| image:: /../../sphinx-ext/themes/orange_theme/static/images/2.png
46       :align: middle
47       :alt: 2
48
49.. |3| image:: /../../sphinx-ext/themes/orange_theme/static/images/3.png
50       :align: middle
51       :alt: 3
52       
53.. |4| image:: /../../sphinx-ext/themes/orange_theme/static/images/4.png
54       :align: middle
55       :alt: 4
56       
57.. |5| image:: /../../sphinx-ext/themes/orange_theme/static/images/5.png
58       :align: middle
59       :alt: 5
60       
61.. |6| image:: /../../sphinx-ext/themes/orange_theme/static/images/6.png
62       :align: middle
63       :alt: 6
64       
65.. |7| image:: /../../sphinx-ext/themes/orange_theme/static/images/7.png
66       :align: middle
67       :alt: 7
68       
69.. |8| image:: /../../sphinx-ext/themes/orange_theme/static/images/8.png
70       :align: middle
71       :alt: 8
72       
73.. |9| image:: /../../sphinx-ext/themes/orange_theme/static/images/9.png
74       :align: middle
75       :alt: 9
76       
77.. |10| image:: /../../sphinx-ext/themes/orange_theme/static/images/10.png
78       :align: middle
79       :alt: 10
80"""
81
82# General information about the project.
83project = u'Orange'
84copyright = u'Bioinformatics Laboratory, FRI UL'
85
86# The version info for the project you're documenting, acts as replacement for
87# |version| and |release|, also used in various other places throughout the
88# built documents.
89#
90# The short X.Y version.
91version = '2.5'
92# The full version, including alpha/beta/rc tags.
93release = '2.5 beta'
94
95# The language for content autogenerated by Sphinx. Refer to documentation
96# for a list of supported languages.
97#language = None
98
99# There are two options for replacing |today|: either, you set today to some
100# non-false value, then it is used:
101#today = ''
102# Else, today_fmt is used as the format for a strftime call.
103#today_fmt = '%B %d, %Y'
104
105# List of documents that shouldn't be included in the build.
106#unused_docs = []
107
108# List of directories, relative to source directory, that shouldn't be searched
109# for source files.
110exclude_trees = ['_build']
111
112# The reST default role (used for this markup: `text`) to use for all documents.
113#default_role = None
114
115# If true, '()' will be appended to :func: etc. cross-reference text.
116#add_function_parentheses = True
117
118# If true, the current module name will be prepended to all description
119# unit titles (such as .. function::).
120#add_module_names = True
121
122# If true, sectionauthor and moduleauthor directives will be shown in the
123# output. They are ignored by default.
124#show_authors = False
125
126# The name of the Pygments (syntax highlighting) style to use.
127pygments_style = 'sphinx'
128
129# A list of ignored prefixes for module index sorting.
130#modindex_common_prefix = []
131
132
133# -- Options for HTML output ---------------------------------------------------
134
135# The theme to use for HTML and HTML Help pages.  Major themes that come with
136# Sphinx are currently 'default' and 'sphinxdoc'.
137html_theme = 'orange_theme'
138
139# Theme options are theme-specific and customize the look and feel of a theme
140# further.  For a list of options available for each theme, see the
141# documentation.
142html_theme_options = {"collapsiblesidebar": "false"}
143
144if html_theme == "orange_theme":
145    html_theme_options.update({"orangeheaderfooter": "false"})
146
147# Add any paths that contain custom themes here, relative to this directory.
148html_theme_path = ["../../sphinx-ext/themes"]
149
150# The name for this set of Sphinx documents.  If None, it defaults to
151# "<project> v<release> documentation".
152html_title = "Orange Widgets"
153
154# A shorter title for the navigation bar.  Default is the same as html_title.
155#html_short_title = None
156
157# The name of an image file (relative to this directory) to place at the top
158# of the sidebar.
159#html_logo = None
160
161# The name of an image file (within the static path) to use as favicon of the
162# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
163# pixels large.
164#html_favicon = None
165
166# Add any paths that contain custom static files (such as style sheets) here,
167# relative to this directory. They are copied after the builtin static files,
168# so a file named "default.css" will overwrite the builtin "default.css".
169html_static_path = []
170
171# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
172# using the given strftime format.
173#html_last_updated_fmt = '%b %d, %Y'
174
175# If true, SmartyPants will be used to convert quotes and dashes to
176# typographically correct entities.
177#html_use_smartypants = True
178
179# Custom sidebar templates, maps document names to template names.
180#html_sidebars = {}
181
182# Additional templates that should be rendered to pages, maps page names to
183# template names.
184#html_additional_pages = {}
185
186# If false, no module index is generated.
187#html_use_modindex = True
188
189# If false, no index is generated.
190#html_use_index = True
191
192# If true, the index is split into individual pages for each letter.
193#html_split_index = False
194
195# If true, links to the reST sources are added to the pages.
196#html_show_sourcelink = True
197
198# If true, an OpenSearch description file will be output, and all pages will
199# contain a <link> tag referring to it.  The value of this option must be the
200# base URL from which the finished HTML is served.
201#html_use_opensearch = ''
202
203# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
204#html_file_suffix = ''
205
206# Output file base name for HTML help builder.
207htmlhelp_basename = 'widgetsdoc'
208
209
210# -- Options for LaTeX output --------------------------------------------------
211
212# The paper size ('letter' or 'a4').
213#latex_paper_size = 'letter'
214
215# The font size ('10pt', '11pt' or '12pt').
216#latex_font_size = '10pt'
217
218# Grouping the document tree into LaTeX files. List of tuples
219# (source start file, target name, title, author, documentclass [howto/manual]).
220latex_documents = [
221  ('index', 'widgets.tex', u'Widgets',
222   u'Biolab', 'manual'),
223]
224
225# The name of an image file (relative to this directory) to place at the top of
226# the title page.
227#latex_logo = None
228
229# For "manual" documents, if this is true, then toplevel headings are parts,
230# not chapters.
231#latex_use_parts = False
232
233# Additional stuff for the LaTeX preamble.
234#latex_preamble = ''
235
236# Documents to append as an appendix to all manuals.
237#latex_appendices = []
238
239# If false, no module index is generated.
240#latex_use_modindex = True
241
242# -- Options for Epub output ---------------------------------------------------
243
244# Bibliographic Dublin Core info.
245epub_title = u'Orange Widgets'
246epub_author = u'Biolab'
247epub_publisher = u'Biolab'
248epub_copyright = u'Bioinformatics Laboratory, FRI UL'
249
250# The language of the text. It defaults to the language option
251# or en if the language is not set.
252epub_language = 'en'
253
254# The scheme of the identifier. Typical schemes are ISBN or URL.
255#epub_scheme = ''
256
257# The unique identifier of the text. This can be a ISBN number
258# or the project homepage.
259#epub_identifier = ''
260
261# A unique identification for the text.
262#epub_uid = ''
263
264# HTML files that should be inserted before the pages created by sphinx.
265# The format is a list of tuples containing the path and title.
266#epub_pre_files = []
267
268# HTML files that should be inserted after the pages created by sphinx.
269# The format is a list of tuples containing the path and title.
270#epub_post_files = []
271
272# A list of files that should not be packed into the epub file.
273epub_exclude_files = ["index.html", "genindex.html", "py-modindex.html", "search.html"]
274
275# The depth of the table of contents in toc.ncx.
276#epub_tocdepth = 3
277
278# Allow duplicate toc entries.
279#epub_tocdup = True
280
281# Example configuration for intersphinx: refer to the Python standard library.
282intersphinx_mapping = {
283    'python': ('http://docs.python.org/', None),
284    'reference': ('http://orange.biolab.si/doc/reference/', 'http://orange.biolab.si/doc/reference/_objects/'),
285}
286
287from docutils import nodes
288from docutils.transforms import Transform
289 
290class StampListDecorate(Transform):
291    default_priority = 1000
292    def apply(self):
293        for node in self.document.traverse(nodes.Node):
294            if isinstance(node,  nodes.Node) and not isinstance(node, nodes.Text):
295                if "stamp-list" in node["classes"][:]:
296                    self.decorate(node)
297               
298    def decorate(self, node):
299        for ol in node.traverse(nodes.enumerated_list):
300            start = int(ol["start"]) if "start" in ol else 1
301            for i, list_item in enumerate(ol.traverse(nodes.list_item)):
302                list_item["classes"].append("list-item-%i" % (start + i))
303
304def setup(app):
305    app.add_transform(StampListDecorate)
Note: See TracBrowser for help on using the repository browser.