source: branches/PublicaMundi_David-devel/docs/conf.py @ 665

Last change on this file since 665 was 659, checked in by nbozon, 10 years ago

Massive update of zoo docs

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-python
File size: 4.2 KB
RevLine 
[348]1# -*- coding: utf-8 -*-
2#
[659]3# Sphinx documentation build configuration file
[348]4
[659]5import re
6import sphinx
[348]7
8
[659]9extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
10              'sphinx.ext.autosummary', 'sphinx.ext.extlinks',
11              'sphinx.ext.viewcode']
[348]12
[659]13master_doc = 'contents'
[348]14templates_path = ['_templates']
15exclude_patterns = ['_build']
16
[659]17project = 'ZOO-Project'
18copyright = '2009-2015, ZOO-Project team'
19version = sphinx.__released__
20release = version
21show_authors = True
[348]22
[659]23html_theme = 'sphinx_rtd_theme'
24html_theme_path = ['_themes']
25modindex_common_prefix = ['sphinx.']
26html_static_path = ['_static']
27html_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}
28html_additional_pages = {'index': 'index.html'}
29html_use_opensearch = 'http://sphinx-doc.org'
[348]30
[659]31htmlhelp_basename = 'Sphinxdoc'
[348]32
[659]33epub_theme = 'epub'
34epub_basename = 'sphinx'
35epub_author = 'Georg Brandl'
36epub_publisher = 'http://sphinx-doc.org/'
37epub_scheme = 'url'
38epub_identifier = epub_publisher
39epub_pre_files = [('index.html', 'Welcome')]
40epub_post_files = [('install.html', 'Installing Sphinx'),
41                   ('develop.html', 'Sphinx development')]
42epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',
43                      '_static/jquery.js', '_static/searchtools.js',
44                      '_static/underscore.js', '_static/basic.css',
45                      'search.html', '_static/websupport.js']
46epub_fix_images = False
47epub_max_image_width = 0
48epub_show_urls = 'inline'
49epub_use_index = False
50epub_guide = (('toc', 'contents.html', u'Table of Contents'),)
[348]51
[659]52latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
53                    'Georg Brandl', 'manual', 1)]
54latex_logo = '_static/sphinx.png'
55latex_elements = {
56    'fontpkg': '\\usepackage{palatino}',
[348]57}
[659]58latex_show_urls = 'footnote'
[348]59
[659]60autodoc_member_order = 'groupwise'
61todo_include_todos = True
62extlinks = {'duref': ('http://docutils.sourceforge.net/docs/ref/rst/'
63                      'restructuredtext.html#%s', ''),
64            'durole': ('http://docutils.sourceforge.net/docs/ref/rst/'
65                       'roles.html#%s', ''),
66            'dudir': ('http://docutils.sourceforge.net/docs/ref/rst/'
67                      'directives.html#%s', '')}
[348]68
[659]69man_pages = [
70    ('contents', 'sphinx-all', 'Sphinx documentation generator system manual',
71     'Georg Brandl', 1),
72    ('man/sphinx-build', 'sphinx-build', 'Sphinx documentation generator tool',
73     '', 1),
74    ('man/sphinx-quickstart', 'sphinx-quickstart', 'Sphinx documentation '
75     'template generator', '', 1),
76    ('man/sphinx-apidoc', 'sphinx-apidoc', 'Sphinx API doc generator tool',
77     '', 1),
[348]78]
79
[659]80texinfo_documents = [
81    ('contents', 'sphinx', 'Sphinx Documentation', 'Georg Brandl',
82     'Sphinx', 'The Sphinx documentation builder.', 'Documentation tools',
83     1),
[348]84]
85
[659]86# We're not using intersphinx right now, but if we did, this would be part of
87# the mapping:
88intersphinx_mapping = {'python': ('https://docs.python.org/2/', None)}
[348]89
[659]90# Sphinx document translation with sphinx gettext feature uses these settings:
91locale_dirs = ['locale/']
92gettext_compact = False
[348]93
94
[659]95# -- Extension interface -------------------------------------------------------
[348]96
[659]97from sphinx import addnodes  # noqa
[348]98
[659]99event_sig_re = re.compile(r'([a-zA-Z-]+)\s*\((.*)\)')
[348]100
101
[659]102def parse_event(env, sig, signode):
103    m = event_sig_re.match(sig)
104    if not m:
105        signode += addnodes.desc_name(sig, sig)
106        return sig
107    name, args = m.groups()
108    signode += addnodes.desc_name(name, name)
109    plist = addnodes.desc_parameterlist()
110    for arg in args.split(','):
111        arg = arg.strip()
112        plist += addnodes.desc_parameter(arg, arg)
113    signode += plist
114    return name
[348]115
116
[659]117def setup(app):
118    from sphinx.ext.autodoc import cut_lines
119    from sphinx.util.docfields import GroupedField
120    app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
121    app.add_object_type('confval', 'confval',
122                        objname='configuration value',
123                        indextemplate='pair: %s; configuration value')
124    fdesc = GroupedField('parameter', label='Parameters',
125                         names=['param'], can_collapse=True)
126    app.add_object_type('event', 'event', 'pair: %s; event', parse_event,
127                        doc_field_types=[fdesc])
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png