You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
5.8 KiB

6 years ago
6 years ago
6 years ago
6 years ago
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Tendermint documentation build configuration file, created by
  4. # sphinx-quickstart on Mon Aug 7 04:55:09 2017.
  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. # If extensions (or modules to document with autodoc) are in another directory,
  15. # add these directories to sys.path here. If the directory is relative to the
  16. # documentation root, use os.path.abspath to make it absolute, like shown here.
  17. #
  18. import os
  19. # import sys
  20. # sys.path.insert(0, os.path.abspath('.'))
  21. import urllib
  22. import sphinx_rtd_theme
  23. # -- General configuration ------------------------------------------------
  24. # If your documentation needs a minimal Sphinx version, state it here.
  25. #
  26. # needs_sphinx = '1.0'
  27. # Add any Sphinx extension module names here, as strings. They can be
  28. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  29. # ones.
  30. extensions = []
  31. # Add any paths that contain templates here, relative to this directory.
  32. templates_path = ['_templates']
  33. # The suffix(es) of source filenames.
  34. # You can specify multiple suffix as a list of string:
  35. #
  36. from recommonmark.parser import CommonMarkParser
  37. source_parsers = {
  38. '.md': CommonMarkParser,
  39. }
  40. source_suffix = ['.rst', '.md']
  41. #source_suffix = '.rst'
  42. # The master toctree document.
  43. master_doc = 'index'
  44. # General information about the project.
  45. project = u'Tendermint'
  46. copyright = u'2018, The Authors'
  47. author = u'Tendermint'
  48. # The version info for the project you're documenting, acts as replacement for
  49. # |version| and |release|, also used in various other places throughout the
  50. # built documents.
  51. #
  52. # The short X.Y version.
  53. version = u''
  54. # The full version, including alpha/beta/rc tags.
  55. release = u''
  56. # The language for content autogenerated by Sphinx. Refer to documentation
  57. # for a list of supported languages.
  58. #
  59. # This is also used if you do content translation via gettext catalogs.
  60. # Usually you set "language" from the command line for these cases.
  61. language = None
  62. # List of patterns, relative to source directory, that match files and
  63. # directories to ignore when looking for source files.
  64. # This patterns also effect to html_static_path and html_extra_path
  65. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'architecture', 'spec', 'examples']
  66. # The name of the Pygments (syntax highlighting) style to use.
  67. pygments_style = 'sphinx'
  68. # If true, `todo` and `todoList` produce output, else they produce nothing.
  69. todo_include_todos = False
  70. # -- Options for HTML output ----------------------------------------------
  71. # The theme to use for HTML and HTML Help pages. See the documentation for
  72. # a list of builtin themes.
  73. #
  74. html_theme = 'sphinx_rtd_theme'
  75. # html_theme = 'alabaster'
  76. # Theme options are theme-specific and customize the look and feel of a theme
  77. # further. For a list of options available for each theme, see the
  78. # documentation.
  79. #
  80. # html_theme_options = {}
  81. # Add any paths that contain custom static files (such as style sheets) here,
  82. # relative to this directory. They are copied after the builtin static files,
  83. # so a file named "default.css" will overwrite the builtin "default.css".
  84. html_static_path = ['_static']
  85. # Custom sidebar templates, must be a dictionary that maps document names
  86. # to template names.
  87. #
  88. # This is required for the alabaster theme
  89. # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
  90. html_sidebars = {
  91. '**': [
  92. 'about.html',
  93. 'navigation.html',
  94. 'relations.html', # needs 'show_related': True theme option to display
  95. 'searchbox.html',
  96. 'donate.html',
  97. ]
  98. }
  99. # -- Options for HTMLHelp output ------------------------------------------
  100. # Output file base name for HTML help builder.
  101. htmlhelp_basename = 'Tendermintdoc'
  102. # -- Options for LaTeX output ---------------------------------------------
  103. latex_elements = {
  104. # The paper size ('letterpaper' or 'a4paper').
  105. #
  106. # 'papersize': 'letterpaper',
  107. # The font size ('10pt', '11pt' or '12pt').
  108. #
  109. # 'pointsize': '10pt',
  110. # Additional stuff for the LaTeX preamble.
  111. #
  112. # 'preamble': '',
  113. # Latex figure (float) alignment
  114. #
  115. # 'figure_align': 'htbp',
  116. }
  117. # Grouping the document tree into LaTeX files. List of tuples
  118. # (source start file, target name, title,
  119. # author, documentclass [howto, manual, or own class]).
  120. latex_documents = [
  121. (master_doc, 'Tendermint.tex', u'Tendermint Documentation',
  122. u'The Authors', 'manual'),
  123. ]
  124. # -- Options for manual page output ---------------------------------------
  125. # One entry per manual page. List of tuples
  126. # (source start file, name, description, authors, manual section).
  127. man_pages = [
  128. (master_doc, 'Tendermint', u'Tendermint Documentation',
  129. [author], 1)
  130. ]
  131. # -- Options for Texinfo output -------------------------------------------
  132. # Grouping the document tree into Texinfo files. List of tuples
  133. # (source start file, target name, title, author,
  134. # dir menu entry, description, category)
  135. texinfo_documents = [
  136. (master_doc, 'Tendermint', u'Tendermint Documentation',
  137. author, 'Tendermint', 'Byzantine Fault Tolerant Consensus.',
  138. 'Database'),
  139. ]
  140. # ---------------- customizations ----------------------
  141. # for Docker README, below
  142. from shutil import copyfile
  143. # tm-bench and tm-monitor
  144. tools_repo = "https://raw.githubusercontent.com/tendermint/tools/"
  145. tools_branch = "master"
  146. tools_dir = "./tools"
  147. if os.path.isdir(tools_dir) != True:
  148. os.mkdir(tools_dir)
  149. copyfile('../DOCKER/README.md', tools_dir+'/docker.md')
  150. urllib.urlretrieve(tools_repo+tools_branch+'/tm-bench/README.md', filename=tools_dir+'/benchmarking.md')
  151. urllib.urlretrieve(tools_repo+tools_branch+'/tm-monitor/README.md', filename=tools_dir+'/monitoring.md')