conf.py 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. # documentation build configuration file, created by
  2. # sphinx-quickstart on Sat Sep 10 18:18:25 2011.
  3. #
  4. # This file is execfile()d with the current directory set to its containing dir.
  5. #
  6. # Note that not all possible configuration values are present in this
  7. # autogenerated file.
  8. #
  9. # All configuration values have a default; values that are commented out
  10. # serve to show the default.
  11. # If extensions (or modules to document with autodoc) are in another directory,
  12. # add these directories to sys.path here. If the directory is relative to the
  13. # documentation root, use os.path.abspath to make it absolute, like shown here.
  14. import sys, os
  15. sys.path.insert(0, os.path.abspath('../src'))
  16. from borg import __version__ as sw_version
  17. # -- General configuration -----------------------------------------------------
  18. # If your documentation needs a minimal Sphinx version, state it here.
  19. #needs_sphinx = '1.0'
  20. # Add any Sphinx extension module names here, as strings. They can be extensions
  21. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  22. extensions = []
  23. # Add any paths that contain templates here, relative to this directory.
  24. templates_path = ['_templates']
  25. # The suffix of source filenames.
  26. source_suffix = '.rst'
  27. # The encoding of source files.
  28. #source_encoding = 'utf-8-sig'
  29. # The master toctree document.
  30. master_doc = 'index'
  31. # General information about the project.
  32. project = 'Borg - Deduplicating Archiver'
  33. copyright = '2010-2014 Jonas Borgström, 2015-2022 The Borg Collective (see AUTHORS file)'
  34. # The version info for the project you're documenting, acts as replacement for
  35. # |version| and |release|, also used in various other places throughout the
  36. # built documents.
  37. #
  38. # The short X.Y version.
  39. split_char = '+' if '+' in sw_version else '-'
  40. version = sw_version.split(split_char)[0]
  41. # The full version, including alpha/beta/rc tags.
  42. release = version
  43. suppress_warnings = ['image.nonlocal_uri']
  44. # The language for content autogenerated by Sphinx. Refer to documentation
  45. # for a list of supported languages.
  46. #language = None
  47. # There are two options for replacing |today|: either, you set today to some
  48. # non-false value, then it is used:
  49. #today = ''
  50. # Else, today_fmt is used as the format for a strftime call.
  51. today_fmt = '%Y-%m-%d'
  52. # List of patterns, relative to source directory, that match files and
  53. # directories to ignore when looking for source files.
  54. exclude_patterns = ['_build']
  55. # The reST default role (used for this markup: `text`) to use for all documents.
  56. #default_role = None
  57. # The Borg docs contain no or very little Python docs.
  58. # Thus, the primary domain is rst.
  59. primary_domain = 'rst'
  60. # If true, '()' will be appended to :func: etc. cross-reference text.
  61. #add_function_parentheses = True
  62. # If true, the current module name will be prepended to all description
  63. # unit titles (such as .. function::).
  64. #add_module_names = True
  65. # If true, sectionauthor and moduleauthor directives will be shown in the
  66. # output. They are ignored by default.
  67. #show_authors = False
  68. # The name of the Pygments (syntax highlighting) style to use.
  69. pygments_style = 'sphinx'
  70. # A list of ignored prefixes for module index sorting.
  71. #modindex_common_prefix = []
  72. # -- Options for HTML output ---------------------------------------------------
  73. # The theme to use for HTML and HTML Help pages. See the documentation for
  74. # a list of builtin themes.
  75. import guzzle_sphinx_theme
  76. html_theme_path = guzzle_sphinx_theme.html_theme_path()
  77. html_theme = 'guzzle_sphinx_theme'
  78. def set_rst_settings(app):
  79. app.env.settings.update({
  80. 'field_name_limit': 0,
  81. 'option_limit': 0,
  82. })
  83. def setup(app):
  84. app.add_css_file('css/borg.css')
  85. app.connect('builder-inited', set_rst_settings)
  86. # Theme options are theme-specific and customize the look and feel of a theme
  87. # further. For a list of options available for each theme, see the
  88. # documentation.
  89. html_theme_options = {
  90. 'project_nav_name': 'Borg %s' % version,
  91. }
  92. # Add any paths that contain custom themes here, relative to this directory.
  93. #html_theme_path = ['_themes']
  94. # The name for this set of Sphinx documents. If None, it defaults to
  95. # "<project> v<release> documentation".
  96. #html_title = None
  97. # A shorter title for the navigation bar. Default is the same as html_title.
  98. #html_short_title = None
  99. # The name of an image file (relative to this directory) to place at the top
  100. # of the sidebar.
  101. html_logo = '_static/logo.svg'
  102. # The name of an image file (within the static path) to use as favicon of the
  103. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  104. # pixels large.
  105. html_favicon = '_static/favicon.ico'
  106. # Add any paths that contain custom static files (such as style sheets) here,
  107. # relative to this directory. They are copied after the builtin static files,
  108. # so a file named "default.css" will overwrite the builtin "default.css".
  109. html_static_path = ['borg_theme']
  110. html_extra_path = ['../src/borg/paperkey.html']
  111. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  112. # using the given strftime format.
  113. html_last_updated_fmt = '%Y-%m-%d'
  114. # If true, SmartyPants will be used to convert quotes and dashes to
  115. # typographically correct entities.
  116. html_use_smartypants = True
  117. smartquotes_action = 'qe' # no D in there means "do not transform -- and ---"
  118. # Custom sidebar templates, maps document names to template names.
  119. html_sidebars = {
  120. '**': ['logo-text.html', 'searchbox.html', 'globaltoc.html'],
  121. }
  122. # Additional templates that should be rendered to pages, maps page names to
  123. # template names.
  124. #html_additional_pages = {}
  125. # If false, no module index is generated.
  126. #html_domain_indices = True
  127. # If false, no index is generated.
  128. html_use_index = False
  129. # If true, the index is split into individual pages for each letter.
  130. #html_split_index = False
  131. # If true, links to the reST sources are added to the pages.
  132. html_show_sourcelink = False
  133. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  134. html_show_sphinx = False
  135. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  136. html_show_copyright = False
  137. # If true, an OpenSearch description file will be output, and all pages will
  138. # contain a <link> tag referring to it. The value of this option must be the
  139. # base URL from which the finished HTML is served.
  140. #html_use_opensearch = ''
  141. # This is the file name suffix for HTML files (e.g. ".xhtml").
  142. #html_file_suffix = None
  143. # Output file base name for HTML help builder.
  144. htmlhelp_basename = 'borgdoc'
  145. # -- Options for LaTeX output --------------------------------------------------
  146. # Grouping the document tree into LaTeX files. List of tuples
  147. # (source start file, target name, title, author, documentclass [howto/manual]).
  148. latex_documents = [
  149. ('book', 'Borg.tex', 'Borg Documentation',
  150. 'The Borg Collective', 'manual'),
  151. ]
  152. # The name of an image file (relative to this directory) to place at the top of
  153. # the title page.
  154. latex_logo = '_static/logo.pdf'
  155. latex_elements = {
  156. 'papersize': 'a4paper',
  157. 'pointsize': '10pt',
  158. 'figure_align': 'H',
  159. }
  160. # For "manual" documents, if this is true, then toplevel headings are parts,
  161. # not chapters.
  162. #latex_use_parts = False
  163. # If true, show page references after internal links.
  164. #latex_show_pagerefs = False
  165. # If true, show URL addresses after external links.
  166. latex_show_urls = 'footnote'
  167. # Additional stuff for the LaTeX preamble.
  168. #latex_preamble = ''
  169. # Documents to append as an appendix to all manuals.
  170. latex_appendices = [
  171. 'support',
  172. 'resources',
  173. 'changes',
  174. 'authors',
  175. ]
  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. ('usage', 'borg',
  183. 'BorgBackup is a deduplicating backup program with optional compression and authenticated encryption.',
  184. ['The Borg Collective (see AUTHORS file)'],
  185. 1),
  186. ]
  187. extensions = [
  188. 'sphinx.ext.extlinks',
  189. 'sphinx.ext.autodoc',
  190. 'sphinx.ext.todo',
  191. 'sphinx.ext.coverage',
  192. 'sphinx.ext.viewcode',
  193. ]
  194. extlinks = {
  195. 'issue': ('https://github.com/borgbackup/borg/issues/%s', '#'),
  196. 'targz_url': ('https://pypi.python.org/packages/source/b/borgbackup/%%s-%s.tar.gz' % version, None),
  197. }