~stephen-j-boddy/terminator/bugfix-1318542-double-chars

« back to all changes in this revision

Viewing changes to doc/apidoc/conf.py

  • Committer: Stephen Boddy
  • Date: 2015-08-08 02:11:30 UTC
  • Revision ID: stephen.j.boddy@gmail.com-20150808021130-9c1npu4gvenkcb1p
A manual has been added to Terminator
* Added source and generated html of manual, and API doc
* setup.py can install the manual (and by extension do can debuild)
* setup.py has (inactive) code for generating the html from the source
  but this will break if rtd theme is not available
* A few changes to doc strings to make the autodoc prettier
* Added help shortcut, by default F1 to open the local manual
* Added button to About tab to launch manual
* A couple of additional string to translate related to manual/help

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# terminatorlib documentation build configuration file, created by
 
4
# sphinx-quickstart on Sun Aug  2 19:16:50 2015.
 
5
#
 
6
# This file is execfile()d with the current directory set to its
 
7
# containing dir.
 
8
#
 
9
# Note that not all possible configuration values are present in this
 
10
# autogenerated file.
 
11
#
 
12
# All configuration values have a default; values that are commented out
 
13
# serve to show the default.
 
14
 
 
15
import sys
 
16
import os
 
17
import shlex
 
18
import sphinx_rtd_theme
 
19
 
 
20
# If extensions (or modules to document with autodoc) are in another directory,
 
21
# add these directories to sys.path here. If the directory is relative to the
 
22
# documentation root, use os.path.abspath to make it absolute, like shown here.
 
23
sys.path.insert(0, os.path.abspath('../..'))
 
24
 
 
25
# -- General configuration ------------------------------------------------
 
26
 
 
27
# If your documentation needs a minimal Sphinx version, state it here.
 
28
#needs_sphinx = '1.0'
 
29
 
 
30
# Add any Sphinx extension module names here, as strings. They can be
 
31
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 
32
# ones.
 
33
extensions = [
 
34
    'sphinx.ext.autodoc',
 
35
    'sphinx.ext.todo',
 
36
    'sphinx.ext.viewcode',
 
37
]
 
38
 
 
39
# Add any paths that contain templates here, relative to this directory.
 
40
templates_path = ['_templates']
 
41
 
 
42
# The suffix(es) of source filenames.
 
43
# You can specify multiple suffix as a list of string:
 
44
# source_suffix = ['.rst', '.md']
 
45
source_suffix = '.rst'
 
46
 
 
47
# The encoding of source files.
 
48
#source_encoding = 'utf-8-sig'
 
49
 
 
50
# The master toctree document.
 
51
master_doc = 'index'
 
52
 
 
53
# General information about the project.
 
54
project = u'terminatorlib'
 
55
copyright = u'2015, Stephen Boddy, licensed under the CC-BY-SA.'
 
56
author = u'Stephen Boddy'
 
57
 
 
58
# The version info for the project you're documenting, acts as replacement for
 
59
# |version| and |release|, also used in various other places throughout the
 
60
# built documents.
 
61
#
 
62
# The short X.Y version.
 
63
version = '0.98'
 
64
# The full version, including alpha/beta/rc tags.
 
65
release = '0.98'
 
66
 
 
67
# The language for content autogenerated by Sphinx. Refer to documentation
 
68
# for a list of supported languages.
 
69
#
 
70
# This is also used if you do content translation via gettext catalogs.
 
71
# Usually you set "language" from the command line for these cases.
 
72
language = 'en'
 
73
 
 
74
# There are two options for replacing |today|: either, you set today to some
 
75
# non-false value, then it is used:
 
76
#today = ''
 
77
# Else, today_fmt is used as the format for a strftime call.
 
78
#today_fmt = '%B %d, %Y'
 
79
 
 
80
# List of patterns, relative to source directory, that match files and
 
81
# directories to ignore when looking for source files.
 
82
exclude_patterns = ['_build']
 
83
 
 
84
# The reST default role (used for this markup: `text`) to use for all
 
85
# documents.
 
86
#default_role = None
 
87
 
 
88
# If true, '()' will be appended to :func: etc. cross-reference text.
 
89
#add_function_parentheses = True
 
90
 
 
91
# If true, the current module name will be prepended to all description
 
92
# unit titles (such as .. function::).
 
93
#add_module_names = True
 
94
 
 
95
# If true, sectionauthor and moduleauthor directives will be shown in the
 
96
# output. They are ignored by default.
 
97
#show_authors = False
 
98
 
 
99
# The name of the Pygments (syntax highlighting) style to use.
 
100
pygments_style = 'sphinx'
 
101
 
 
102
# A list of ignored prefixes for module index sorting.
 
103
#modindex_common_prefix = []
 
104
 
 
105
# If true, keep warnings as "system message" paragraphs in the built documents.
 
106
#keep_warnings = False
 
107
 
 
108
# If true, `todo` and `todoList` produce output, else they produce nothing.
 
109
todo_include_todos = True
 
110
 
 
111
####### Customizations here #######
 
112
 
 
113
# Sort members by type
 
114
autodoc_member_order = 'groupwise'
 
115
 
 
116
# Ensure that the __init__ method gets documented.
 
117
def skip(app, what, name, obj, skip, options):
 
118
    if name == "__init__":
 
119
        return False
 
120
    if name in ['__module__','__weakref__','__gtype__','__dict__']:
 
121
        return True
 
122
    return skip
 
123
 
 
124
def setup(app):
 
125
    app.connect("autodoc-skip-member", skip)
 
126
 
 
127
### Mock out the keybinder module
 
128
import mock, sys
 
129
MOCK_MODULES = ['keybinder']
 
130
for mod_name in MOCK_MODULES:
 
131
    sys.modules[mod_name] = mock.Mock()
 
132
 
 
133
### freebsd workaround
 
134
import mox
 
135
 
 
136
class DummyCDLL:
 
137
    def __init__(self, libname):
 
138
        pass
 
139
    def sysctlbyname(self, param, verptr, uintlen, none, num):
 
140
        verptr._obj.value=800019
 
141
        return 0
 
142
 
 
143
m1=mox.Mox()
 
144
import ctypes
 
145
ctypes.CDLL = DummyCDLL
 
146
 
 
147
### ipc.py workaround
 
148
m1=mox.Mox()
 
149
import gtk
 
150
m1.StubOutWithMock(gtk.gdk, 'get_display')
 
151
gtk.gdk.get_display().AndReturn(':0.0')
 
152
###
 
153
 
 
154
autodoc_default_flags = ['private-members','special-members']
 
155
 
 
156
# -- Options for HTML output ----------------------------------------------
 
157
 
 
158
# The theme to use for HTML and HTML Help pages.  See the documentation for
 
159
# a list of builtin themes.
 
160
html_theme = 'sphinx_rtd_theme'
 
161
 
 
162
# Theme options are theme-specific and customize the look and feel of a theme
 
163
# further.  For a list of options available for each theme, see the
 
164
# documentation.
 
165
#html_theme_options = {}
 
166
 
 
167
# Add any paths that contain custom themes here, relative to this directory.
 
168
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
169
 
 
170
# The name for this set of Sphinx documents.  If None, it defaults to
 
171
# "<project> v<release> documentation".
 
172
#html_title = None
 
173
 
 
174
# A shorter title for the navigation bar.  Default is the same as html_title.
 
175
#html_short_title = None
 
176
 
 
177
# The name of an image file (relative to this directory) to place at the top
 
178
# of the sidebar.
 
179
#html_logo = None
 
180
 
 
181
# The name of an image file (within the static path) to use as favicon of the
 
182
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 
183
# pixels large.
 
184
#html_favicon = None
 
185
 
 
186
# Add any paths that contain custom static files (such as style sheets) here,
 
187
# relative to this directory. They are copied after the builtin static files,
 
188
# so a file named "default.css" will overwrite the builtin "default.css".
 
189
html_static_path = ['_static']
 
190
 
 
191
# Add any extra paths that contain custom files (such as robots.txt or
 
192
# .htaccess) here, relative to this directory. These files are copied
 
193
# directly to the root of the documentation.
 
194
#html_extra_path = []
 
195
 
 
196
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 
197
# using the given strftime format.
 
198
#html_last_updated_fmt = '%b %d, %Y'
 
199
 
 
200
# If true, SmartyPants will be used to convert quotes and dashes to
 
201
# typographically correct entities.
 
202
#html_use_smartypants = True
 
203
 
 
204
# Custom sidebar templates, maps document names to template names.
 
205
#html_sidebars = {}
 
206
 
 
207
# Additional templates that should be rendered to pages, maps page names to
 
208
# template names.
 
209
#html_additional_pages = {}
 
210
 
 
211
# If false, no module index is generated.
 
212
#html_domain_indices = True
 
213
 
 
214
# If false, no index is generated.
 
215
#html_use_index = True
 
216
 
 
217
# If true, the index is split into individual pages for each letter.
 
218
#html_split_index = False
 
219
 
 
220
# If true, links to the reST sources are added to the pages.
 
221
#html_show_sourcelink = True
 
222
 
 
223
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
 
224
#html_show_sphinx = True
 
225
 
 
226
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
 
227
#html_show_copyright = True
 
228
 
 
229
# If true, an OpenSearch description file will be output, and all pages will
 
230
# contain a <link> tag referring to it.  The value of this option must be the
 
231
# base URL from which the finished HTML is served.
 
232
#html_use_opensearch = ''
 
233
 
 
234
# This is the file name suffix for HTML files (e.g. ".xhtml").
 
235
#html_file_suffix = None
 
236
 
 
237
# Language to be used for generating the HTML full-text search index.
 
238
# Sphinx supports the following languages:
 
239
#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
 
240
#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
 
241
#html_search_language = 'en'
 
242
 
 
243
# A dictionary with options for the search language support, empty by default.
 
244
# Now only 'ja' uses this config value
 
245
#html_search_options = {'type': 'default'}
 
246
 
 
247
# The name of a javascript file (relative to the configuration directory) that
 
248
# implements a search results scorer. If empty, the default will be used.
 
249
#html_search_scorer = 'scorer.js'
 
250
 
 
251
# Output file base name for HTML help builder.
 
252
htmlhelp_basename = 'terminatorlibdoc'
 
253
 
 
254
# -- Options for LaTeX output ---------------------------------------------
 
255
 
 
256
latex_elements = {
 
257
# The paper size ('letterpaper' or 'a4paper').
 
258
#'papersize': 'letterpaper',
 
259
 
 
260
# The font size ('10pt', '11pt' or '12pt').
 
261
#'pointsize': '10pt',
 
262
 
 
263
# Additional stuff for the LaTeX preamble.
 
264
#'preamble': '',
 
265
 
 
266
# Latex figure (float) alignment
 
267
#'figure_align': 'htbp',
 
268
}
 
269
 
 
270
# Grouping the document tree into LaTeX files. List of tuples
 
271
# (source start file, target name, title,
 
272
#  author, documentclass [howto, manual, or own class]).
 
273
latex_documents = [
 
274
  (master_doc, 'terminatorlib.tex', u'terminatorlib Documentation',
 
275
   u'Stephen Boddy', 'manual'),
 
276
]
 
277
 
 
278
# The name of an image file (relative to this directory) to place at the top of
 
279
# the title page.
 
280
#latex_logo = None
 
281
 
 
282
# For "manual" documents, if this is true, then toplevel headings are parts,
 
283
# not chapters.
 
284
#latex_use_parts = False
 
285
 
 
286
# If true, show page references after internal links.
 
287
#latex_show_pagerefs = False
 
288
 
 
289
# If true, show URL addresses after external links.
 
290
#latex_show_urls = False
 
291
 
 
292
# Documents to append as an appendix to all manuals.
 
293
#latex_appendices = []
 
294
 
 
295
# If false, no module index is generated.
 
296
#latex_domain_indices = True
 
297
 
 
298
 
 
299
# -- Options for manual page output ---------------------------------------
 
300
 
 
301
# One entry per manual page. List of tuples
 
302
# (source start file, name, description, authors, manual section).
 
303
man_pages = [
 
304
    (master_doc, 'terminatorlib', u'terminatorlib Documentation',
 
305
     [author], 1)
 
306
]
 
307
 
 
308
# If true, show URL addresses after external links.
 
309
#man_show_urls = False
 
310
 
 
311
 
 
312
# -- Options for Texinfo output -------------------------------------------
 
313
 
 
314
# Grouping the document tree into Texinfo files. List of tuples
 
315
# (source start file, target name, title, author,
 
316
#  dir menu entry, description, category)
 
317
texinfo_documents = [
 
318
  (master_doc, 'terminatorlib', u'terminatorlib Documentation',
 
319
   author, 'terminatorlib', 'One line description of project.',
 
320
   'Miscellaneous'),
 
321
]
 
322
 
 
323
# Documents to append as an appendix to all manuals.
 
324
#texinfo_appendices = []
 
325
 
 
326
# If false, no module index is generated.
 
327
#texinfo_domain_indices = True
 
328
 
 
329
# How to display URL addresses: 'footnote', 'no', or 'inline'.
 
330
#texinfo_show_urls = 'footnote'
 
331
 
 
332
# If true, do not generate a @detailmenu in the "Top" node's menu.
 
333
#texinfo_no_detailmenu = False
 
334
 
 
335
 
 
336
# -- Options for Epub output ----------------------------------------------
 
337
 
 
338
# Bibliographic Dublin Core info.
 
339
epub_title = project
 
340
epub_author = author
 
341
epub_publisher = author
 
342
epub_copyright = copyright
 
343
 
 
344
# The basename for the epub file. It defaults to the project name.
 
345
#epub_basename = project
 
346
 
 
347
# The HTML theme for the epub output. Since the default themes are not optimized
 
348
# for small screen space, using the same theme for HTML and epub output is
 
349
# usually not wise. This defaults to 'epub', a theme designed to save visual
 
350
# space.
 
351
#epub_theme = 'epub'
 
352
 
 
353
# The language of the text. It defaults to the language option
 
354
# or 'en' if the language is not set.
 
355
#epub_language = ''
 
356
 
 
357
# The scheme of the identifier. Typical schemes are ISBN or URL.
 
358
#epub_scheme = ''
 
359
 
 
360
# The unique identifier of the text. This can be a ISBN number
 
361
# or the project homepage.
 
362
#epub_identifier = ''
 
363
 
 
364
# A unique identification for the text.
 
365
#epub_uid = ''
 
366
 
 
367
# A tuple containing the cover image and cover page html template filenames.
 
368
#epub_cover = ()
 
369
 
 
370
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
 
371
#epub_guide = ()
 
372
 
 
373
# HTML files that should be inserted before the pages created by sphinx.
 
374
# The format is a list of tuples containing the path and title.
 
375
#epub_pre_files = []
 
376
 
 
377
# HTML files shat should be inserted after the pages created by sphinx.
 
378
# The format is a list of tuples containing the path and title.
 
379
#epub_post_files = []
 
380
 
 
381
# A list of files that should not be packed into the epub file.
 
382
epub_exclude_files = ['search.html']
 
383
 
 
384
# The depth of the table of contents in toc.ncx.
 
385
#epub_tocdepth = 3
 
386
 
 
387
# Allow duplicate toc entries.
 
388
#epub_tocdup = True
 
389
 
 
390
# Choose between 'default' and 'includehidden'.
 
391
#epub_tocscope = 'default'
 
392
 
 
393
# Fix unsupported image types using the Pillow.
 
394
#epub_fix_images = False
 
395
 
 
396
# Scale large images.
 
397
#epub_max_image_width = 0
 
398
 
 
399
# How to display URL addresses: 'footnote', 'no', or 'inline'.
 
400
#epub_show_urls = 'inline'
 
401
 
 
402
# If false, no index is generated.
 
403
#epub_use_index = True