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