conf.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. # wxGUI documentation build configuration file, created by
  2. # sphinx-quickstart on Tue Jun 3 09:20:51 2014.
  3. #
  4. # This file is execfile()d with the current directory set to its
  5. # containing dir.
  6. #
  7. # Note that not all possible configuration values are present in this
  8. # autogenerated file.
  9. #
  10. # All configuration values have a default; values that are commented out
  11. # serve to show the default.
  12. import sys
  13. import 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(
  23. 0, os.path.abspath(os.path.join(os.environ["GISBASE"], "etc", "python", "grass"))
  24. )
  25. sys.path.insert(
  26. 0,
  27. os.path.abspath(
  28. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "ctypes")
  29. ),
  30. )
  31. sys.path.insert(
  32. 0,
  33. os.path.abspath(
  34. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "exceptions")
  35. ),
  36. )
  37. sys.path.insert(
  38. 0,
  39. os.path.abspath(
  40. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "gunittest")
  41. ),
  42. )
  43. sys.path.insert(
  44. 0,
  45. os.path.abspath(
  46. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "imaging")
  47. ),
  48. )
  49. sys.path.insert(
  50. 0,
  51. os.path.abspath(
  52. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "pydispatch")
  53. ),
  54. )
  55. sys.path.insert(
  56. 0,
  57. os.path.abspath(
  58. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "pygrass")
  59. ),
  60. )
  61. sys.path.insert(
  62. 0,
  63. os.path.abspath(
  64. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "script")
  65. ),
  66. )
  67. sys.path.insert(
  68. 0,
  69. os.path.abspath(
  70. os.path.join(os.environ["GISBASE"], "etc", "python", "grass", "temporal")
  71. ),
  72. )
  73. from grass.script import core
  74. footer_tmpl = string.Template(
  75. r"""
  76. {% block footer %}<hr class="header">
  77. <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>
  78. <p>&copy; 2003-${year} <a href="https://grass.osgeo.org">GRASS Development Team</a>, GRASS GIS ${grass_version} Reference Manual</p>
  79. {% endblock %}
  80. """
  81. )
  82. grass_version = core.version()["version"]
  83. today = date.today()
  84. copy("_templates/layout.html.template", "_templates/layout.html")
  85. with open("_templates/layout.html", "a") as f:
  86. f.write(footer_tmpl.substitute(grass_version=grass_version, year=today.year))
  87. f.close()
  88. # -- General configuration -----------------------------------------------------
  89. # If your documentation needs a minimal Sphinx version, state it here.
  90. # needs_sphinx = '1.0'
  91. # Add any Sphinx extension module names here, as strings. They can be
  92. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  93. # ones.
  94. extensions = [
  95. "sphinx.ext.autodoc",
  96. "sphinx.ext.doctest",
  97. "sphinx.ext.todo",
  98. "sphinx.ext.coverage",
  99. "sphinx.ext.mathjax",
  100. "sphinx.ext.ifconfig",
  101. "sphinx.ext.viewcode",
  102. ]
  103. # Add any paths that contain templates here, relative to this directory.
  104. templates_path = ["_templates"]
  105. # The suffix of source filenames.
  106. source_suffix = ".rst"
  107. # The encoding of source files.
  108. # source_encoding = 'utf-8-sig'
  109. # The master toctree document.
  110. master_doc = "index"
  111. # General information about the project.
  112. project = "Python library documentation"
  113. copyright = "2014, GRASS Development Team"
  114. # The version info for the project you're documenting, acts as replacement for
  115. # |version| and |release|, also used in various other places throughout the
  116. # built documents.
  117. #
  118. # The short X.Y version.
  119. # version = '0.1'
  120. # The full version, including alpha/beta/rc tags.
  121. # release = '0.1'
  122. # The language for content autogenerated by Sphinx. Refer to documentation
  123. # for a list of supported languages.
  124. # http://sphinx-doc.org/config.html#options-for-internationalization
  125. language = "en"
  126. # There are two options for replacing |today|: either, you set today to some
  127. # non-false value, then it is used:
  128. # today = ''
  129. # Else, today_fmt is used as the format for a strftime call.
  130. # today_fmt = '%B %d, %Y'
  131. # List of patterns, relative to source directory, that match files and
  132. # directories to ignore when looking for source files.
  133. exclude_patterns = ["_build"]
  134. # The reST default role (used for this markup: `text`) to use for all
  135. # documents.
  136. # default_role = None
  137. # If true, '()' will be appended to :func: etc. cross-reference text.
  138. # add_function_parentheses = True
  139. # If true, the current module name will be prepended to all description
  140. # unit titles (such as .. function::).
  141. # add_module_names = True
  142. # If true, sectionauthor and moduleauthor directives will be shown in the
  143. # output. They are ignored by default.
  144. # show_authors = False
  145. # The name of the Pygments (syntax highlighting) style to use.
  146. pygments_style = "sphinx"
  147. # A list of ignored prefixes for module index sorting.
  148. # modindex_common_prefix = []
  149. # If true, keep warnings as "system message" paragraphs in the built documents.
  150. # keep_warnings = False
  151. # -- Options for HTML output ----------------------------------------------
  152. # The theme to use for HTML and HTML Help pages. See the documentation for
  153. # a list of builtin themes.
  154. html_theme = "traditional"
  155. # Theme options are theme-specific and customize the look and feel of a theme
  156. # further. For a list of options available for each theme, see the
  157. # documentation.
  158. # html_theme_options = {}
  159. # Add any paths that contain custom themes here, relative to this directory.
  160. # html_theme_path = []
  161. # The name for this set of Sphinx documents. If None, it defaults to
  162. # "<project> v<release> documentation".
  163. # html_title = None
  164. # A shorter title for the navigation bar. Default is the same as html_title.
  165. # html_short_title = None
  166. # The name of an image file (relative to this directory) to place at the top
  167. # of the sidebar.
  168. # html_logo = None
  169. # The name of an image file (within the static path) to use as favicon of the
  170. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  171. # pixels large.
  172. # html_favicon = None
  173. # Add any paths that contain custom static files (such as style sheets) here,
  174. # relative to this directory. They are copied after the builtin static files,
  175. # so a file named "default.css" will overwrite the builtin "default.css".
  176. html_static_path = ["_static"]
  177. # Add any extra paths that contain custom files (such as robots.txt or
  178. # .htaccess) here, relative to this directory. These files are copied
  179. # directly to the root of the documentation.
  180. # html_extra_path = []
  181. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  182. # using the given strftime format.
  183. # html_last_updated_fmt = '%b %d, %Y'
  184. # If true, SmartyPants will be used to convert quotes and dashes to
  185. # typographically correct entities.
  186. # html_use_smartypants = True
  187. # Custom sidebar templates, maps document names to template names.
  188. html_sidebars = {"**": ["localtoc.html", "relations.html", "searchbox.html"]}
  189. # Additional templates that should be rendered to pages, maps page names to
  190. # template names.
  191. # html_additional_pages = {}
  192. # If false, no module index is generated.
  193. # html_domain_indices = True
  194. # If false, no index is generated.
  195. html_use_index = True
  196. # If true, the index is split into individual pages for each letter.
  197. # html_split_index = False
  198. # If true, links to the reST sources are added to the pages.
  199. html_show_sourcelink = True
  200. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  201. html_show_sphinx = True
  202. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  203. html_show_copyright = True
  204. # If true, an OpenSearch description file will be output, and all pages will
  205. # contain a <link> tag referring to it. The value of this option must be the
  206. # base URL from which the finished HTML is served.
  207. # html_use_opensearch = ''
  208. # This is the file name suffix for HTML files (e.g. ".xhtml").
  209. # html_file_suffix = None
  210. # Output file base name for HTML help builder.
  211. htmlhelp_basename = "PythonLibdoc"
  212. # -- Options for LaTeX output ---------------------------------------------
  213. latex_elements = {
  214. # The paper size ('letterpaper' or 'a4paper').
  215. "papersize": "a4paper",
  216. # The font size ('10pt', '11pt' or '12pt').
  217. "pointsize": "10pt",
  218. # Additional stuff for the LaTeX preamble.
  219. # 'preamble': '',
  220. }
  221. # Grouping the document tree into LaTeX files. List of tuples
  222. # (source start file, target name, title,
  223. # author, documentclass [howto, manual, or own class]).
  224. latex_documents = [
  225. (
  226. "index",
  227. "PythonLib.tex",
  228. "Python Library Documentation",
  229. "GRASS Development Team",
  230. "manual",
  231. ),
  232. ]
  233. # The name of an image file (relative to this directory) to place at the top of
  234. # the title page.
  235. # latex_logo = None
  236. # For "manual" documents, if this is true, then toplevel headings are parts,
  237. # not chapters.
  238. # latex_use_parts = False
  239. # If true, show page references after internal links.
  240. # latex_show_pagerefs = False
  241. # If true, show URL addresses after external links.
  242. # latex_show_urls = False
  243. # Documents to append as an appendix to all manuals.
  244. # latex_appendices = []
  245. # If false, no module index is generated.
  246. # latex_domain_indices = True
  247. # -- Options for manual page output ---------------------------------------
  248. # One entry per manual page. List of tuples
  249. # (source start file, name, description, authors, manual section).
  250. man_pages = [
  251. (
  252. "index",
  253. "PythonLib",
  254. "Python Library Documentation",
  255. ["GRASS Development Team"],
  256. 1,
  257. )
  258. ]
  259. # If true, show URL addresses after external links.
  260. # man_show_urls = False
  261. # -- Options for Texinfo output -------------------------------------------
  262. # Grouping the document tree into Texinfo files. List of tuples
  263. # (source start file, target name, title, author,
  264. # dir menu entry, description, category)
  265. texinfo_documents = [
  266. (
  267. "index",
  268. "PythonLib",
  269. "Python Library Documentation",
  270. "GRASS Development Team",
  271. "PythonLib",
  272. "One line description of project.",
  273. "Miscellaneous",
  274. ),
  275. ]
  276. # Documents to append as an appendix to all manuals.
  277. # texinfo_appendices = []
  278. # If false, no module index is generated.
  279. # texinfo_domain_indices = True
  280. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  281. # texinfo_show_urls = 'footnote'
  282. # If true, do not generate a @detailmenu in the "Top" node's menu.
  283. # texinfo_no_detailmenu = False
  284. # -- Options for Epub output ----------------------------------------------
  285. # Bibliographic Dublin Core info.
  286. epub_title = "PythonLib"
  287. epub_author = "GRASS Development Team"
  288. epub_publisher = "GRASS Development Team"
  289. epub_copyright = "2014, GRASS Development Team"
  290. # The basename for the epub file. It defaults to the project name.
  291. # epub_basename = u'wxGUI'
  292. # The HTML theme for the epub output. Since the default themes are not optimized
  293. # for small screen space, using the same theme for HTML and epub output is
  294. # usually not wise. This defaults to 'epub', a theme designed to save visual
  295. # space.
  296. # epub_theme = 'epub'
  297. # The language of the text. It defaults to the language option
  298. # or en if the language is not set.
  299. # epub_language = ''
  300. # The scheme of the identifier. Typical schemes are ISBN or URL.
  301. # epub_scheme = ''
  302. # The unique identifier of the text. This can be a ISBN number
  303. # or the project homepage.
  304. # epub_identifier = ''
  305. # A unique identification for the text.
  306. # epub_uid = ''
  307. # A tuple containing the cover image and cover page html template filenames.
  308. # epub_cover = ()
  309. # A sequence of (type, uri, title) tuples for the guide element of content.opf.
  310. # epub_guide = ()
  311. # HTML files that should be inserted before the pages created by sphinx.
  312. # The format is a list of tuples containing the path and title.
  313. # epub_pre_files = []
  314. # HTML files shat should be inserted after the pages created by sphinx.
  315. # The format is a list of tuples containing the path and title.
  316. # epub_post_files = []
  317. # A list of files that should not be packed into the epub file.
  318. epub_exclude_files = ["search.html"]
  319. # The depth of the table of contents in toc.ncx.
  320. # epub_tocdepth = 3
  321. # Allow duplicate toc entries.
  322. # epub_tocdup = True
  323. # Choose between 'default' and 'includehidden'.
  324. # epub_tocscope = 'default'
  325. # Fix unsupported image types using the PIL.
  326. # epub_fix_images = False
  327. # Scale large images.
  328. # epub_max_image_width = 0
  329. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  330. # epub_show_urls = 'inline'
  331. # If false, no index is generated.
  332. # epub_use_index = True