conf.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. # -*- coding: utf-8 -*-
  2. #
  3. # PyGRASS documentation build configuration file, created by
  4. # sphinx-quickstart2 on Sat Jun 16 18:53:32 2012.
  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. import sys, os
  14. from datetime import date
  15. import string
  16. from shutil import copy
  17. # If extensions (or modules to document with autodoc) are in another directory,
  18. # add these directories to sys.path here. If the directory is relative to the
  19. # documentation root, use os.path.abspath to make it absolute, like shown here.
  20. if not os.getenv('GISBASE'):
  21. sys.exit("GISBASE not defined")
  22. sys.path.insert(0, os.path.abspath(os.path.join(os.environ['GISBASE'], 'etc', 'python', 'grass')))
  23. from grass.script import core
  24. footer_tmpl = string.Template(\
  25. r"""
  26. {% block footer %}<hr class="header">
  27. <p><a href="../index.html">Help Index</a> | <a href="../topics.html">Topics Index</a> | <a href="../keywords.html">Keywords Index</a> | <a href="../full_index.html">Full Index</a></p>
  28. <p>&copy; 2003-${year} <a href="http://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${grass_version} Reference Manual</p>
  29. {% endblock %}
  30. """)
  31. grass_version = core.version()['version']
  32. today = date.today()
  33. copy("_templates/layout.html.template", "_templates/layout.html")
  34. with open("_templates/layout.html", "a+b") as f:
  35. f.write(footer_tmpl.substitute(grass_version=grass_version, year=today.year))
  36. f.close()
  37. # -- General configuration -----------------------------------------------------
  38. # If your documentation needs a minimal Sphinx version, state it here.
  39. #needs_sphinx = '1.0'
  40. # Add any Sphinx extension module names here, as strings. They can be extensions
  41. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  42. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
  43. # Add any paths that contain templates here, relative to this directory.
  44. templates_path = ['_templates']
  45. # The suffix of source filenames.
  46. source_suffix = '.rst'
  47. # The encoding of source files.
  48. #source_encoding = 'utf-8-sig'
  49. # The master toctree document.
  50. master_doc = 'index'
  51. # General information about the project.
  52. project = u'PyGRASS'
  53. copyright = u'2012-2014, Pietro Zambelli'
  54. # The version info for the project you're documenting, acts as replacement for
  55. # |version| and |release|, also used in various other places throughout the
  56. # built documents.
  57. #
  58. # The short X.Y version.
  59. #version = '0.2'
  60. # The full version, including alpha/beta/rc tags.
  61. #release = 'beta'
  62. # The language for content autogenerated by Sphinx. Refer to documentation
  63. # for a list of supported languages.
  64. language = 'python'
  65. # There are two options for replacing |today|: either, you set today to some
  66. # non-false value, then it is used:
  67. #today = ''
  68. # Else, today_fmt is used as the format for a strftime call.
  69. #today_fmt = '%B %d, %Y'
  70. # List of patterns, relative to source directory, that match files and
  71. # directories to ignore when looking for source files.
  72. exclude_patterns = ['_build']
  73. # The reST default role (used for this markup: `text`) to use for all documents.
  74. #default_role = None
  75. # If true, '()' will be appended to :func: etc. cross-reference text.
  76. #add_function_parentheses = True
  77. # If true, the current module name will be prepended to all description
  78. # unit titles (such as .. function::).
  79. #add_module_names = True
  80. # If true, sectionauthor and moduleauthor directives will be shown in the
  81. # output. They are ignored by default.
  82. #show_authors = False
  83. # The name of the Pygments (syntax highlighting) style to use.
  84. pygments_style = 'sphinx'
  85. # A list of ignored prefixes for module index sorting.
  86. #modindex_common_prefix = []
  87. # If true, doctest flags (comments looking like # doctest: FLAG, ...)
  88. # at the ends of lines and <BLANKLINE> markers are removed for all code blocks
  89. # showing interactive Python sessions (i.e. doctests). Default is true.
  90. trim_doctest_flags = True
  91. intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)}
  92. # -- Options for HTML output ---------------------------------------------------
  93. # The theme to use for HTML and HTML Help pages. See the documentation for
  94. # a list of builtin themes.
  95. html_theme = 'traditional'
  96. # Theme options are theme-specific and customize the look and feel of a theme
  97. # further. For a list of options available for each theme, see the
  98. # documentation.
  99. #html_theme_options = {}
  100. # Add any paths that contain custom themes here, relative to this directory.
  101. #html_theme_path = []
  102. # The name for this set of Sphinx documents. If None, it defaults to
  103. # "<project> v<release> documentation".
  104. #html_title = None
  105. # A shorter title for the navigation bar. Default is the same as html_title.
  106. #html_short_title = None
  107. # The name of an image file (relative to this directory) to place at the top
  108. # of the sidebar.
  109. #html_logo = None
  110. # The name of an image file (within the static path) to use as favicon of the
  111. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  112. # pixels large.
  113. #html_favicon = None
  114. # Add any paths that contain custom static files (such as style sheets) here,
  115. # relative to this directory. They are copied after the builtin static files,
  116. # so a file named "default.css" will overwrite the builtin "default.css".
  117. html_static_path = ['_static']
  118. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  119. # using the given strftime format.
  120. #html_last_updated_fmt = '%b %d, %Y'
  121. # If true, SmartyPants will be used to convert quotes and dashes to
  122. # typographically correct entities.
  123. #html_use_smartypants = True
  124. # Custom sidebar templates, maps document names to template names.
  125. html_sidebars = {"**":["localtoc.html",'relations.html','searchbox.html']}
  126. # Additional templates that should be rendered to pages, maps page names to
  127. # template names.
  128. #html_additional_pages = {}
  129. # If false, no module index is generated.
  130. #html_domain_indices = True
  131. # If false, no index is generated.
  132. html_use_index = True
  133. # If true, the index is split into individual pages for each letter.
  134. #html_split_index = False
  135. # If true, links to the reST sources are added to the pages.
  136. html_show_sourcelink = True
  137. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  138. html_show_sphinx = True
  139. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  140. html_show_copyright = True
  141. # If true, an OpenSearch description file will be output, and all pages will
  142. # contain a <link> tag referring to it. The value of this option must be the
  143. # base URL from which the finished HTML is served.
  144. #html_use_opensearch = ''
  145. # This is the file name suffix for HTML files (e.g. ".xhtml").
  146. #html_file_suffix = None
  147. # Output file base name for HTML help builder.
  148. htmlhelp_basename = 'PyGrassdoc'
  149. # -- Options for LaTeX output --------------------------------------------------
  150. latex_elements = {
  151. # The paper size ('letterpaper' or 'a4paper').
  152. 'papersize': 'a4paper',
  153. # The font size ('10pt', '11pt' or '12pt').
  154. 'pointsize': '10pt',
  155. # Additional stuff for the LaTeX preamble.
  156. #'preamble': '',
  157. }
  158. # Grouping the document tree into LaTeX files. List of tuples
  159. # (source start file, target name, title, author, documentclass [howto/manual]).
  160. latex_documents = [
  161. ('index', 'PyGrass.tex', u'PyGRASS Documentation',
  162. u'Pietro Zambelli', 'manual'),
  163. ]
  164. # The name of an image file (relative to this directory) to place at the top of
  165. # the title page.
  166. #latex_logo = None
  167. # For "manual" documents, if this is true, then toplevel headings are parts,
  168. # not chapters.
  169. #latex_use_parts = False
  170. # If true, show page references after internal links.
  171. #latex_show_pagerefs = False
  172. # If true, show URL addresses after external links.
  173. #latex_show_urls = False
  174. # Documents to append as an appendix to all manuals.
  175. #latex_appendices = []
  176. # If false, no module index is generated.
  177. #latex_domain_indices = True
  178. # -- Options for manual page output --------------------------------------------
  179. # One entry per manual page. List of tuples
  180. # (source start file, name, description, authors, manual section).
  181. man_pages = [
  182. ('index', 'pygrass', u'PyGRASS Documentation',
  183. [u'Pietro Zambelli'], 1)
  184. ]
  185. # If true, show URL addresses after external links.
  186. #man_show_urls = False
  187. # -- Options for Texinfo output ------------------------------------------------
  188. # Grouping the document tree into Texinfo files. List of tuples
  189. # (source start file, target name, title, author,
  190. # dir menu entry, description, category)
  191. texinfo_documents = [
  192. ('index', 'PyGRASS', u'PyGRASS Documentation',
  193. u'Pietro Zambelli', 'PyGRASS', 'One line description of project.',
  194. 'Miscellaneous'),
  195. ]
  196. # Documents to append as an appendix to all manuals.
  197. #texinfo_appendices = []
  198. # If false, no module index is generated.
  199. #texinfo_domain_indices = True
  200. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  201. #texinfo_show_urls = 'footnote'
  202. # -- Options for Epub output ---------------------------------------------------
  203. # Bibliographic Dublin Core info.
  204. epub_title = u'PyGRASS'
  205. epub_author = u'Pietro Zambelli'
  206. epub_publisher = u'Pietro Zambelli'
  207. epub_copyright = u'2012, Pietro Zambelli'
  208. # The language of the text. It defaults to the language option
  209. # or en if the language is not set.
  210. #epub_language = ''
  211. # The scheme of the identifier. Typical schemes are ISBN or URL.
  212. #epub_scheme = ''
  213. # The unique identifier of the text. This can be a ISBN number
  214. # or the project homepage.
  215. #epub_identifier = ''
  216. # A unique identification for the text.
  217. #epub_uid = ''
  218. # A tuple containing the cover image and cover page html template filenames.
  219. #epub_cover = ()
  220. # HTML files that should be inserted before the pages created by sphinx.
  221. # The format is a list of tuples containing the path and title.
  222. #epub_pre_files = []
  223. # HTML files shat should be inserted after the pages created by sphinx.
  224. # The format is a list of tuples containing the path and title.
  225. #epub_post_files = []
  226. # A list of files that should not be packed into the epub file.
  227. #epub_exclude_files = []
  228. # The depth of the table of contents in toc.ncx.
  229. #epub_tocdepth = 3
  230. # Allow duplicate toc entries.
  231. #epub_tocdup = True