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