]>
Commit | Line | Data |
---|---|---|
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 | 20 | import os |
49df8ac1 | 21 | import sys |
7ef486ae DM |
22 | # sys.path.insert(0, os.path.abspath('.')) |
23 | ||
49df8ac1 OB |
24 | # custom extensions |
25 | sys.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 | ||
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 | ||
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 | 52 | extensions = ["sphinx.ext.graphviz", 'sphinx.ext.mathjax', "sphinx.ext.todo", "proxmox-scanrefs"] |
7ef486ae | 53 | |
d87b193b TL |
54 | todo_link_only = True |
55 | ||
7ef486ae DM |
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' | |
24f3c551 | 74 | copyright = '2019-2023, Proxmox Server Solutions GmbH' |
7ef486ae DM |
75 | author = '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 |
82 | vstr = lambda s: '<devbuild>' if s is None else str(s) |
83 | ||
84 | version = vstr(os.getenv('DEB_VERSION_UPSTREAM')) | |
7ef486ae | 85 | # The full version, including alpha/beta/rc tags. |
1f6a4f58 | 86 | release = vstr(os.getenv('DEB_VERSION')) |
7ef486ae | 87 | |
c63688e0 TL |
88 | epilog_file = open('epilog.rst', 'r') |
89 | rst_epilog = epilog_file.read() | |
90 | rst_epilog += f"\n.. |VERSION| replace:: {version}" | |
96a7169e | 91 | rst_epilog += f"\n.. |pbs-copyright| replace:: Copyright (C) {copyright}" |
c63688e0 | 92 | |
ed873dc6 TL |
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), | |
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), | |
117 | ] | |
118 | ||
119 | ||
7ef486ae DM |
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. | |
52c89be6 | 125 | language = 'en' |
7ef486ae DM |
126 | |
127 | # There are two options for replacing |today|: either, you set today to some | |
128 | # non-false value, then it is used: | |
7ef486ae DM |
129 | # today = '' |
130 | # | |
131 | # Else, today_fmt is used as the format for a strftime call. | |
796480a3 | 132 | today_fmt = '%A, %d %B %Y' |
7ef486ae | 133 | |
ed873dc6 TL |
134 | suppress_warnings = [ 'toc.excluded' ] |
135 | ||
7ef486ae DM |
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 | |
f13c36c8 DM |
139 | exclude_patterns = [ |
140 | '_build', 'Thumbs.db', '.DS_Store', | |
6189b956 | 141 | 'certificate-management.rst', |
3147e56a | 142 | 'epilog.rst', |
f13c36c8 | 143 | 'pbs-copyright.rst', |
c760a672 | 144 | 'local-zfs.rst', |
861f8b8f | 145 | 'package-repositories.rst', |
c760a672 SI |
146 | 'system-booting.rst', |
147 | 'traffic-control.rst', | |
f13c36c8 | 148 | ] |
7ef486ae DM |
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. | |
8cce5113 | 179 | todo_include_todos = not tags.has('release') |
7ef486ae DM |
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 | # | |
05c16a6e | 187 | html_theme = 'alabaster' |
7ef486ae DM |
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 | # | |
05c16a6e TL |
193 | html_theme_options = { |
194 | 'fixed_sidebar': True, | |
fd6a54df TL |
195 | 'sidebar_includehidden': False, |
196 | 'sidebar_collapse': False, | |
197 | 'globaltoc_collapse': False, | |
198 | 'show_relbar_bottom': True, | |
05c16a6e TL |
199 | 'show_powered_by': False, |
200 | ||
fd6a54df | 201 | 'extra_nav_links': { |
8f49d603 | 202 | 'Proxmox Homepage': 'https://www.proxmox.com', |
fd6a54df | 203 | 'PDF': 'proxmox-backup.pdf', |
1adbc7c1 | 204 | 'API Viewer' : 'api-viewer/index.html', |
3323798b | 205 | 'Prune Simulator' : 'prune-simulator/index.html', |
4a227b54 | 206 | 'LTO Barcode Generator' : 'lto-barcode/index.html', |
1ae2a84a | 207 | 'Proxmox Backup Server Wiki' : 'https://pbs.proxmox.com' |
fd6a54df | 208 | }, |
05c16a6e | 209 | |
fd6a54df TL |
210 | 'sidebar_width': '320px', |
211 | 'page_width': '1320px', | |
05c16a6e TL |
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 | } | |
7ef486ae | 218 | |
a76934ad TL |
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 | ||
7ef486ae DM |
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 | # | |
05c16a6e | 252 | #html_logo = 'images/proxmox-logo.svg' # replaced by html_theme_options.logo |
7ef486ae DM |
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 | ||
8a40e226 TL |
265 | html_js_files = [ |
266 | 'custom.js', | |
267 | ] | |
99bc0ff3 HD |
268 | html_css_files = [ |
269 | 'custom.css', | |
270 | ] | |
8a40e226 | 271 | |
7ef486ae DM |
272 | # Add any extra paths that contain custom files (such as robots.txt or |
273 | # .htaccess) here, relative to this directory. These files are copied | |
274 | # directly to the root of the documentation. | |
275 | # | |
276 | # html_extra_path = [] | |
277 | ||
278 | # If not None, a 'Last updated on:' timestamp is inserted at every page | |
279 | # bottom, using the given strftime format. | |
280 | # The empty string is equivalent to '%b %d, %Y'. | |
281 | # | |
282 | # html_last_updated_fmt = None | |
283 | ||
b22a9c14 DM |
284 | # We need to disable smatquotes, else Option Lists do not display long options |
285 | smartquotes = False | |
7ef486ae | 286 | |
7ef486ae DM |
287 | # Additional templates that should be rendered to pages, maps page names to |
288 | # template names. | |
289 | # | |
290 | # html_additional_pages = {} | |
291 | ||
292 | # If false, no module index is generated. | |
293 | # | |
294 | # html_domain_indices = True | |
295 | ||
296 | # If false, no index is generated. | |
297 | # | |
298 | # html_use_index = True | |
299 | ||
300 | # If true, the index is split into individual pages for each letter. | |
301 | # | |
302 | # html_split_index = False | |
303 | ||
304 | # If true, links to the reST sources are added to the pages. | |
305 | # | |
05c16a6e | 306 | html_show_sourcelink = False |
7ef486ae DM |
307 | |
308 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. | |
309 | # | |
310 | # html_show_sphinx = True | |
311 | ||
312 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. | |
313 | # | |
314 | # html_show_copyright = True | |
315 | ||
316 | # If true, an OpenSearch description file will be output, and all pages will | |
317 | # contain a <link> tag referring to it. The value of this option must be the | |
318 | # base URL from which the finished HTML is served. | |
319 | # | |
320 | # html_use_opensearch = '' | |
321 | ||
322 | # This is the file name suffix for HTML files (e.g. ".xhtml"). | |
323 | # html_file_suffix = None | |
324 | ||
325 | # Language to be used for generating the HTML full-text search index. | |
326 | # Sphinx supports the following languages: | |
327 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja' | |
328 | # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh' | |
329 | # | |
330 | # html_search_language = 'en' | |
331 | ||
332 | # A dictionary with options for the search language support, empty by default. | |
333 | # 'ja' uses this config value. | |
334 | # 'zh' user can custom change `jieba` dictionary path. | |
335 | # | |
336 | # html_search_options = {'type': 'default'} | |
337 | ||
338 | # The name of a javascript file (relative to the configuration directory) that | |
339 | # implements a search results scorer. If empty, the default will be used. | |
340 | # | |
341 | # html_search_scorer = 'scorer.js' | |
342 | ||
343 | # Output file base name for HTML help builder. | |
344 | htmlhelp_basename = 'ProxmoxBackupdoc' | |
345 | ||
f3c867a0 TL |
346 | # use local mathjax package, symlink comes from debian/proxmox-backup-docs.links |
347 | mathjax_path = "mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML" | |
348 | ||
7ef486ae DM |
349 | # -- Options for LaTeX output --------------------------------------------- |
350 | ||
15d74eaa DM |
351 | latex_engine = 'xelatex' |
352 | ||
7ef486ae | 353 | latex_elements = { |
15d74eaa DM |
354 | 'fontenc': '\\usepackage{fontspec}', |
355 | ||
7ef486ae DM |
356 | # The paper size ('letterpaper' or 'a4paper'). |
357 | # | |
358 | 'papersize': 'a4paper', | |
359 | ||
360 | # The font size ('10pt', '11pt' or '12pt'). | |
361 | # | |
15d74eaa DM |
362 | 'pointsize': '10pt', |
363 | ||
364 | 'fontpkg': r''' | |
25cf0906 | 365 | \setmainfont{Open Sans} |
fc598cdb | 366 | \setsansfont{Lato} |
bca294a1 | 367 | \setmonofont{DejaVu Sans Mono} |
15d74eaa | 368 | ''', |
7ef486ae DM |
369 | |
370 | # Additional stuff for the LaTeX preamble. | |
371 | # | |
bca294a1 | 372 | # 'preamble': '', |
7ef486ae DM |
373 | |
374 | # Latex figure (float) alignment | |
375 | # | |
376 | # 'figure_align': 'htbp', | |
377 | } | |
378 | ||
379 | # Grouping the document tree into LaTeX files. List of tuples | |
380 | # (source start file, target name, title, | |
381 | # author, documentclass [howto, manual, or own class]). | |
382 | latex_documents = [ | |
383 | (master_doc, 'ProxmoxBackup.tex', 'Proxmox Backup Documentation', | |
384 | 'Proxmox Support Team', 'manual'), | |
385 | ] | |
386 | ||
387 | # The name of an image file (relative to this directory) to place at the top of | |
388 | # the title page. | |
389 | # | |
390 | # | |
391 | # Note: newer sphinx 1.6 should be able to convert .svg to .png | |
392 | # automatically using sphinx.ext.imgconverter | |
393 | latex_logo = "images/proxmox-logo.png" | |
394 | ||
395 | # For "manual" documents, if this is true, then toplevel headings are parts, | |
396 | # not chapters. | |
397 | # | |
398 | # latex_use_parts = False | |
399 | ||
400 | # If true, show page references after internal links. | |
401 | # | |
402 | # latex_show_pagerefs = False | |
403 | ||
404 | # If true, show URL addresses after external links. | |
405 | # | |
406 | # latex_show_urls = False | |
407 | ||
408 | # Documents to append as an appendix to all manuals. | |
409 | # | |
410 | # latex_appendices = [] | |
411 | ||
412 | # It false, will not define \strong, \code, itleref, \crossref ... but only | |
413 | # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added | |
414 | # packages. | |
415 | # | |
416 | # latex_keep_old_macro_names = True | |
417 | ||
418 | # If false, no module index is generated. | |
419 | # | |
420 | # latex_domain_indices = True | |
421 | ||
462077df TL |
422 | latex_table_style = ['booktabs', 'colorrows'] |
423 | ||
7ef486ae DM |
424 | |
425 | # -- Options for Epub output ---------------------------------------------- | |
426 | ||
427 | # Bibliographic Dublin Core info. | |
428 | epub_title = project | |
429 | epub_author = author | |
430 | epub_publisher = author | |
431 | epub_copyright = copyright | |
432 | ||
433 | # The basename for the epub file. It defaults to the project name. | |
434 | # epub_basename = project | |
435 | ||
436 | # The HTML theme for the epub output. Since the default themes are not | |
437 | # optimized for small screen space, using the same theme for HTML and epub | |
438 | # output is usually not wise. This defaults to 'epub', a theme designed to save | |
439 | # visual space. | |
440 | # | |
441 | # epub_theme = 'epub' | |
442 | ||
443 | # The language of the text. It defaults to the language option | |
444 | # or 'en' if the language is not set. | |
445 | # | |
446 | # epub_language = '' | |
447 | ||
448 | # The scheme of the identifier. Typical schemes are ISBN or URL. | |
449 | # epub_scheme = '' | |
450 | ||
451 | # The unique identifier of the text. This can be a ISBN number | |
452 | # or the project homepage. | |
453 | # | |
454 | # epub_identifier = '' | |
455 | ||
456 | # A unique identification for the text. | |
457 | # | |
458 | # epub_uid = '' | |
459 | ||
460 | # A tuple containing the cover image and cover page html template filenames. | |
461 | # | |
462 | # epub_cover = () | |
463 | ||
464 | # A sequence of (type, uri, title) tuples for the guide element of content.opf. | |
465 | # | |
466 | # epub_guide = () | |
467 | ||
468 | # HTML files that should be inserted before the pages created by sphinx. | |
469 | # The format is a list of tuples containing the path and title. | |
470 | # | |
471 | # epub_pre_files = [] | |
472 | ||
473 | # HTML files that should be inserted after the pages created by sphinx. | |
474 | # The format is a list of tuples containing the path and title. | |
475 | # | |
476 | # epub_post_files = [] | |
477 | ||
478 | # A list of files that should not be packed into the epub file. | |
479 | epub_exclude_files = ['search.html'] | |
480 | ||
481 | # The depth of the table of contents in toc.ncx. | |
482 | # | |
483 | # epub_tocdepth = 3 | |
484 | ||
485 | # Allow duplicate toc entries. | |
486 | # | |
487 | # epub_tocdup = True | |
488 | ||
489 | # Choose between 'default' and 'includehidden'. | |
490 | # | |
491 | # epub_tocscope = 'default' | |
492 | ||
493 | # Fix unsupported image types using the Pillow. | |
494 | # | |
495 | # epub_fix_images = False | |
496 | ||
497 | # Scale large images. | |
498 | # | |
499 | # epub_max_image_width = 0 | |
500 | ||
501 | # How to display URL addresses: 'footnote', 'no', or 'inline'. | |
502 | # | |
503 | # epub_show_urls = 'inline' | |
504 | ||
505 | # If false, no index is generated. | |
506 | # | |
507 | # epub_use_index = True |