source: trunk/docs/conf.py @ 778

Last change on this file since 778 was 727, checked in by djay, 9 years ago

Fixes in documentation to build pdf correctly... Put back the note about availability of PDF and epub formats.

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-python
File size: 3.1 KB
RevLine 
[348]1# -*- coding: utf-8 -*-
2#
[668]3# ZOO Project documentation build configuration file
[348]4
[659]5import re
6import sphinx
[348]7
[668]8extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo','sphinx.ext.autosummary', 'sphinx.ext.extlinks','sphinx.ext.viewcode']
[669]9master_doc = 'index'
[348]10templates_path = ['_templates']
11exclude_patterns = ['_build']
12
[668]13# General information
14
[659]15project = 'ZOO-Project'
16copyright = '2009-2015, ZOO-Project team'
[668]17version = '1.0'
18release = '1.5'
[659]19show_authors = True
[348]20
[668]21# Options for HTML output
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']}
[670]28#html_additional_pages = {'index': 'index.html'}
[659]29html_use_opensearch = 'http://sphinx-doc.org'
30htmlhelp_basename = 'Sphinxdoc'
[348]31
[668]32# Options for epub output
33
[659]34epub_theme = 'epub'
[668]35epub_basename = 'ZOO-Project'
36epub_author = 'ZOO-Project team'
37epub_publisher = 'http://zoo-project.org/'
[659]38epub_scheme = 'url'
[668]39epub_identifier = 'http://zoo-project.org'
40epub_pre_files = [('index.html', 'ZOO-Project documentation')]
[727]41#epub_post_files = [('install.html', 'Installing Sphinx'),('develop.html', 'Sphinx development')]
[668]42epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js','_static/jquery.js', '_static/searchtools.js','_static/underscore.js', '_static/basic.css','search.html', '_static/websupport.js']
[659]43epub_fix_images = False
44epub_max_image_width = 0
45epub_show_urls = 'inline'
46epub_use_index = False
[669]47epub_guide = (('toc', 'index.html', u'Table of Contents'),)
[348]48
[668]49# Options for LaTeX output
50
51latex_documents = [('contents', 'ZOO-Project.tex', 'ZOO-Project Documentation','ZOO-Project team', 'manual', 1)]
[727]52latex_logo = '_static/zoo-simple.png'
[668]53latex_elements = {'fontpkg': '\\usepackage{palatino}'}
[659]54latex_show_urls = 'footnote'
55todo_include_todos = True
[668]56man_pages = [('index', 'zooproject', 'ZOO-Project Documentation','ZOO-Project team', 1)]
[348]57
[659]58# -- Extension interface -------------------------------------------------------
[348]59
[659]60from sphinx import addnodes  # noqa
[348]61
[659]62event_sig_re = re.compile(r'([a-zA-Z-]+)\s*\((.*)\)')
[348]63
64
[659]65def parse_event(env, sig, signode):
66    m = event_sig_re.match(sig)
67    if not m:
68        signode += addnodes.desc_name(sig, sig)
69        return sig
70    name, args = m.groups()
71    signode += addnodes.desc_name(name, name)
72    plist = addnodes.desc_parameterlist()
73    for arg in args.split(','):
74        arg = arg.strip()
75        plist += addnodes.desc_parameter(arg, arg)
76    signode += plist
77    return name
[348]78
79
[659]80def setup(app):
81    from sphinx.ext.autodoc import cut_lines
82    from sphinx.util.docfields import GroupedField
83    app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
84    app.add_object_type('confval', 'confval',
85                        objname='configuration value',
86                        indextemplate='pair: %s; configuration value')
87    fdesc = GroupedField('parameter', label='Parameters',
88                         names=['param'], can_collapse=True)
89    app.add_object_type('event', 'event', 'pair: %s; event', parse_event,
90                        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