]> git.proxmox.com Git - proxmox-backup.git/blob - docs/conf.py
docs: ransom ware: fix some typos commented in review
[proxmox-backup.git] / docs / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Proxmox Backup documentation build configuration file, originally
5 # created by sphinx-quickstart on Tue Feb 26 16:54:35 2019.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 import os
21 import sys
22 # sys.path.insert(0, os.path.abspath('.'))
23
24 # custom extensions
25 sys.path.append(os.path.abspath("./_ext"))
26
27 # -- Implement custom formatter for code-blocks ---------------------------
28 #
29 # * use smaller font
30 # * avoid space between lines to nicely format utf8 tables
31
32 from sphinx.highlighting import PygmentsBridge
33 from pygments.formatters.latex import LatexFormatter
34
35 class CustomLatexFormatter(LatexFormatter):
36 def __init__(self, **options):
37 super(CustomLatexFormatter, self).__init__(**options)
38 self.verboptions = r"formatcom=\footnotesize\relax\let\strut\empty"
39
40 PygmentsBridge.latex_formatter = CustomLatexFormatter
41
42 # -- General configuration ------------------------------------------------
43
44 # If your documentation needs a minimal Sphinx version, state it here.
45 #
46 # needs_sphinx = '1.0'
47
48 # Add any Sphinx extension module names here, as strings. They can be
49 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50 # ones.
51
52 extensions = ["sphinx.ext.graphviz", 'sphinx.ext.mathjax', "sphinx.ext.todo", "proxmox-scanrefs"]
53
54 todo_link_only = True
55
56 # Add any paths that contain templates here, relative to this directory.
57 templates_path = ['_templates']
58
59 # The suffix(es) of source filenames.
60 # You can specify multiple suffix as a list of string:
61 #
62 # source_suffix = ['.rst', '.md']
63 source_suffix = '.rst'
64
65 # The encoding of source files.
66 #
67 # source_encoding = 'utf-8-sig'
68
69 # The master toctree document.
70 master_doc = 'index'
71
72 # General information about the project.
73 project = 'Proxmox Backup'
74 copyright = '2019-2022, Proxmox Server Solutions GmbH'
75 author = 'Proxmox Support Team'
76
77 # The version info for the project you're documenting acts as a replacement for
78 # |version| and |release|, also used in various other places throughout the
79 # built documents.
80 #
81 # The short X.Y version.
82 vstr = lambda s: '<devbuild>' if s is None else str(s)
83
84 version = vstr(os.getenv('DEB_VERSION_UPSTREAM'))
85 # The full version, including alpha/beta/rc tags.
86 release = vstr(os.getenv('DEB_VERSION'))
87
88 epilog_file = open('epilog.rst', 'r')
89 rst_epilog = epilog_file.read()
90 rst_epilog += f"\n.. |VERSION| replace:: {version}"
91 rst_epilog += f"\n.. |pbs-copyright| replace:: Copyright (C) {copyright}"
92
93 man_pages = [
94 # CLI
95 ('proxmox-backup-client/man1', 'proxmox-backup-client', 'Command line tool for Backup and Restore', [author], 1),
96 ('proxmox-backup-manager/man1', 'proxmox-backup-manager', 'Command line tool to manage and configure the backup server.', [author], 1),
97 ('proxmox-backup-debug/man1', 'proxmox-backup-debug', 'Debugging command line tool for Backup and Restore', [author], 1),
98 ('proxmox-backup-proxy/man1', 'proxmox-backup-proxy', 'Proxmox Backup Public API Server', [author], 1),
99 ('proxmox-backup/man1', 'proxmox-backup', 'Proxmox Backup Local API Server', [author], 1),
100 ('proxmox-file-restore/man1', 'proxmox-file-restore', 'CLI tool for restoring files and directories from Proxmox Backup Server archives', [author], 1),
101 ('proxmox-tape/man1', 'proxmox-tape', 'Proxmox Tape Backup CLI Tool', [author], 1),
102 ('pxar/man1', 'pxar', 'Proxmox File Archive CLI Tool', [author], 1),
103 ('pmt/man1', 'pmt', 'Control Linux Tape Devices', [author], 1),
104 ('pmtx/man1', 'pmtx', 'Control SCSI media changer devices (tape autoloaders)', [author], 1),
105 # configs
106 ('config/acl/man5', 'acl.cfg', 'Access Control Configuration', [author], 5),
107 ('config/datastore/man5', 'datastore.cfg', 'Datastore Configuration', [author], 5),
108 ('config/media-pool/man5', 'media-pool.cfg', 'Media Pool Configuration', [author], 5),
109 ('config/remote/man5', 'remote.cfg', 'Remote Server Configuration', [author], 5),
110 ('config/sync/man5', 'sync.cfg', 'Synchronization Job Configuration', [author], 5),
111 ('config/tape-job/man5', 'tape-job.cfg', 'Tape Job Configuration', [author], 5),
112 ('config/tape/man5', 'tape.cfg', 'Tape Drive and Changer Configuration', [author], 5),
113 ('config/user/man5', 'user.cfg', 'User Configuration', [author], 5),
114 ('config/verification/man5', 'verification.cfg', 'Verification Job Configuration', [author], 5),
115 ]
116
117
118 # The language for content autogenerated by Sphinx. Refer to documentation
119 # for a list of supported languages.
120 #
121 # This is also used if you do content translation via gettext catalogs.
122 # Usually you set "language" from the command line for these cases.
123 language = None
124
125 # There are two options for replacing |today|: either, you set today to some
126 # non-false value, then it is used:
127 # today = ''
128 #
129 # Else, today_fmt is used as the format for a strftime call.
130 today_fmt = '%A, %d %B %Y'
131
132 suppress_warnings = [ 'toc.excluded' ]
133
134 # List of patterns, relative to source directory, that match files and
135 # directories to ignore when looking for source files.
136 # This patterns also effect to html_static_path and html_extra_path
137 exclude_patterns = [
138 '_build', 'Thumbs.db', '.DS_Store',
139 'certificate-management.rst',
140 'epilog.rst',
141 'pbs-copyright.rst',
142 'local-zfs.rst',
143 'package-repositories.rst',
144 'system-booting.rst',
145 'traffic-control.rst',
146 ]
147
148 # The reST default role (used for this markup: `text`) to use for all
149 # documents.
150 #
151 # default_role = None
152
153 # If true, '()' will be appended to :func: etc. cross-reference text.
154 #
155 # add_function_parentheses = True
156
157 # If true, the current module name will be prepended to all description
158 # unit titles (such as .. function::).
159 #
160 # add_module_names = True
161
162 # If true, sectionauthor and moduleauthor directives will be shown in the
163 # output. They are ignored by default.
164 #
165 # show_authors = False
166
167 # The name of the Pygments (syntax highlighting) style to use.
168 pygments_style = 'sphinx'
169
170 # A list of ignored prefixes for module index sorting.
171 # modindex_common_prefix = []
172
173 # If true, keep warnings as "system message" paragraphs in the built documents.
174 # keep_warnings = False
175
176 # If true, `todo` and `todoList` produce output, else they produce nothing.
177 todo_include_todos = not tags.has('release')
178
179
180 # -- Options for HTML output ----------------------------------------------
181
182 # The theme to use for HTML and HTML Help pages. See the documentation for
183 # a list of builtin themes.
184 #
185 html_theme = 'alabaster'
186
187 # Theme options are theme-specific and customize the look and feel of a theme
188 # further. For a list of options available for each theme, see the
189 # documentation.
190 #
191 html_theme_options = {
192 'fixed_sidebar': True,
193 'sidebar_includehidden': False,
194 'sidebar_collapse': False,
195 'globaltoc_collapse': False,
196 'show_relbar_bottom': True,
197 'show_powered_by': False,
198
199 'extra_nav_links': {
200 'Proxmox Homepage': 'https://proxmox.com',
201 'PDF': 'proxmox-backup.pdf',
202 'API Viewer' : 'api-viewer/index.html',
203 'Prune Simulator' : 'prune-simulator/index.html',
204 'LTO Barcode Generator' : 'lto-barcode/index.html',
205 },
206
207 'sidebar_width': '320px',
208 'page_width': '1320px',
209 # font styles
210 'head_font_family': 'Lato, sans-serif',
211 'caption_font_family': 'Lato, sans-serif',
212 'caption_font_size': '20px',
213 'font_family': 'Open Sans, sans-serif',
214 }
215
216 # Alabaster theme recommends setting this fixed.
217 # If you switch theme this needs to removed, probably.
218 html_sidebars = {
219 '**': [
220 'sidebar-header.html',
221 'searchbox.html',
222 'navigation.html',
223 'relations.html',
224 ],
225
226 'index': [
227 'sidebar-header.html',
228 'searchbox.html',
229 'index-sidebar.html',
230 ]
231 }
232
233
234 # Add any paths that contain custom themes here, relative to this directory.
235 # html_theme_path = []
236
237 # The name for this set of Sphinx documents.
238 # "<project> v<release> documentation" by default.
239 #
240 # html_title = 'Proxmox Backup v1.0-1'
241
242 # A shorter title for the navigation bar. Default is the same as html_title.
243 #
244 # html_short_title = None
245
246 # The name of an image file (relative to this directory) to place at the top
247 # of the sidebar.
248 #
249 #html_logo = 'images/proxmox-logo.svg' # replaced by html_theme_options.logo
250
251 # The name of an image file (relative to this directory) to use as a favicon of
252 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
253 # pixels large.
254 #
255 html_favicon = 'images/favicon.ico'
256
257 # Add any paths that contain custom static files (such as style sheets) here,
258 # relative to this directory. They are copied after the builtin static files,
259 # so a file named "default.css" will overwrite the builtin "default.css".
260 html_static_path = ['_static']
261
262 html_js_files = [
263 'custom.js',
264 ]
265
266 # Add any extra paths that contain custom files (such as robots.txt or
267 # .htaccess) here, relative to this directory. These files are copied
268 # directly to the root of the documentation.
269 #
270 # html_extra_path = []
271
272 # If not None, a 'Last updated on:' timestamp is inserted at every page
273 # bottom, using the given strftime format.
274 # The empty string is equivalent to '%b %d, %Y'.
275 #
276 # html_last_updated_fmt = None
277
278 # We need to disable smatquotes, else Option Lists do not display long options
279 smartquotes = False
280
281 # Additional templates that should be rendered to pages, maps page names to
282 # template names.
283 #
284 # html_additional_pages = {}
285
286 # If false, no module index is generated.
287 #
288 # html_domain_indices = True
289
290 # If false, no index is generated.
291 #
292 # html_use_index = True
293
294 # If true, the index is split into individual pages for each letter.
295 #
296 # html_split_index = False
297
298 # If true, links to the reST sources are added to the pages.
299 #
300 html_show_sourcelink = False
301
302 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
303 #
304 # html_show_sphinx = True
305
306 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
307 #
308 # html_show_copyright = True
309
310 # If true, an OpenSearch description file will be output, and all pages will
311 # contain a <link> tag referring to it. The value of this option must be the
312 # base URL from which the finished HTML is served.
313 #
314 # html_use_opensearch = ''
315
316 # This is the file name suffix for HTML files (e.g. ".xhtml").
317 # html_file_suffix = None
318
319 # Language to be used for generating the HTML full-text search index.
320 # Sphinx supports the following languages:
321 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
322 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
323 #
324 # html_search_language = 'en'
325
326 # A dictionary with options for the search language support, empty by default.
327 # 'ja' uses this config value.
328 # 'zh' user can custom change `jieba` dictionary path.
329 #
330 # html_search_options = {'type': 'default'}
331
332 # The name of a javascript file (relative to the configuration directory) that
333 # implements a search results scorer. If empty, the default will be used.
334 #
335 # html_search_scorer = 'scorer.js'
336
337 # Output file base name for HTML help builder.
338 htmlhelp_basename = 'ProxmoxBackupdoc'
339
340 # use local mathjax package, symlink comes from debian/proxmox-backup-docs.links
341 mathjax_path = "mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
342
343 # -- Options for LaTeX output ---------------------------------------------
344
345 latex_engine = 'xelatex'
346
347 latex_elements = {
348 'fontenc': '\\usepackage{fontspec}',
349
350 # The paper size ('letterpaper' or 'a4paper').
351 #
352 'papersize': 'a4paper',
353
354 # The font size ('10pt', '11pt' or '12pt').
355 #
356 'pointsize': '10pt',
357
358 'fontpkg': r'''
359 \setmainfont{Open Sans}
360 \setsansfont{Lato}
361 \setmonofont{DejaVu Sans Mono}
362 ''',
363
364 # Additional stuff for the LaTeX preamble.
365 #
366 # 'preamble': '',
367
368 # Latex figure (float) alignment
369 #
370 # 'figure_align': 'htbp',
371 }
372
373 # Grouping the document tree into LaTeX files. List of tuples
374 # (source start file, target name, title,
375 # author, documentclass [howto, manual, or own class]).
376 latex_documents = [
377 (master_doc, 'ProxmoxBackup.tex', 'Proxmox Backup Documentation',
378 'Proxmox Support Team', 'manual'),
379 ]
380
381 # The name of an image file (relative to this directory) to place at the top of
382 # the title page.
383 #
384 #
385 # Note: newer sphinx 1.6 should be able to convert .svg to .png
386 # automatically using sphinx.ext.imgconverter
387 latex_logo = "images/proxmox-logo.png"
388
389 # For "manual" documents, if this is true, then toplevel headings are parts,
390 # not chapters.
391 #
392 # latex_use_parts = False
393
394 # If true, show page references after internal links.
395 #
396 # latex_show_pagerefs = False
397
398 # If true, show URL addresses after external links.
399 #
400 # latex_show_urls = False
401
402 # Documents to append as an appendix to all manuals.
403 #
404 # latex_appendices = []
405
406 # It false, will not define \strong, \code, itleref, \crossref ... but only
407 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
408 # packages.
409 #
410 # latex_keep_old_macro_names = True
411
412 # If false, no module index is generated.
413 #
414 # latex_domain_indices = True
415
416
417 # -- Options for Epub output ----------------------------------------------
418
419 # Bibliographic Dublin Core info.
420 epub_title = project
421 epub_author = author
422 epub_publisher = author
423 epub_copyright = copyright
424
425 # The basename for the epub file. It defaults to the project name.
426 # epub_basename = project
427
428 # The HTML theme for the epub output. Since the default themes are not
429 # optimized for small screen space, using the same theme for HTML and epub
430 # output is usually not wise. This defaults to 'epub', a theme designed to save
431 # visual space.
432 #
433 # epub_theme = 'epub'
434
435 # The language of the text. It defaults to the language option
436 # or 'en' if the language is not set.
437 #
438 # epub_language = ''
439
440 # The scheme of the identifier. Typical schemes are ISBN or URL.
441 # epub_scheme = ''
442
443 # The unique identifier of the text. This can be a ISBN number
444 # or the project homepage.
445 #
446 # epub_identifier = ''
447
448 # A unique identification for the text.
449 #
450 # epub_uid = ''
451
452 # A tuple containing the cover image and cover page html template filenames.
453 #
454 # epub_cover = ()
455
456 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
457 #
458 # epub_guide = ()
459
460 # HTML files that should be inserted before the pages created by sphinx.
461 # The format is a list of tuples containing the path and title.
462 #
463 # epub_pre_files = []
464
465 # HTML files that should be inserted after the pages created by sphinx.
466 # The format is a list of tuples containing the path and title.
467 #
468 # epub_post_files = []
469
470 # A list of files that should not be packed into the epub file.
471 epub_exclude_files = ['search.html']
472
473 # The depth of the table of contents in toc.ncx.
474 #
475 # epub_tocdepth = 3
476
477 # Allow duplicate toc entries.
478 #
479 # epub_tocdup = True
480
481 # Choose between 'default' and 'includehidden'.
482 #
483 # epub_tocscope = 'default'
484
485 # Fix unsupported image types using the Pillow.
486 #
487 # epub_fix_images = False
488
489 # Scale large images.
490 #
491 # epub_max_image_width = 0
492
493 # How to display URL addresses: 'footnote', 'no', or 'inline'.
494 #
495 # epub_show_urls = 'inline'
496
497 # If false, no index is generated.
498 #
499 # epub_use_index = True