Alex Afanasyev | 8e9ee1f | 2023-11-17 19:49:27 +0000 | [diff] [blame^] | 1 | Index: nlsr_0.7.0-11-gfd1e9406/docs/conf.py |
| 2 | =================================================================== |
| 3 | --- nlsr_0.7.0-11-gfd1e9406.orig/docs/conf.py |
| 4 | +++ nlsr_0.7.0-11-gfd1e9406/docs/conf.py |
| 5 | @@ -1,22 +1,32 @@ |
| 6 | +# -*- coding: utf-8 -*- |
| 7 | +# |
| 8 | # Configuration file for the Sphinx documentation builder. |
| 9 | # |
| 10 | -# For the full list of built-in configuration values, see the documentation: |
| 11 | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 12 | - |
| 13 | -import importlib.util |
| 14 | +# This file only contains a selection of the most common options. For a full |
| 15 | +# list see the documentation: |
| 16 | +# http://www.sphinx-doc.org/en/master/config |
| 17 | + |
| 18 | +# -- Path setup -------------------------------------------------------------- |
| 19 | + |
| 20 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 21 | +# add these directories to sys.path here. If the directory is relative to the |
| 22 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 23 | +# |
| 24 | +# import os |
| 25 | import sys |
| 26 | +# sys.path.insert(0, os.path.abspath('.')) |
| 27 | + |
| 28 | |
| 29 | # -- Project information ----------------------------------------------------- |
| 30 | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
| 31 | |
| 32 | -project = 'Named Data Link State Routing Protocol (NLSR)' |
| 33 | -copyright = 'Copyright © 2014-2023 Named Data Networking Project.' |
| 34 | -author = 'Named Data Networking Project' |
| 35 | +project = u'Named Data Link State Routing Protocol (NLSR)' |
| 36 | +copyright = u'Copyright © 2014-2020 Named Data Networking Project.' |
| 37 | +author = u'Named Data Networking Project' |
| 38 | |
| 39 | -# The short X.Y version. |
| 40 | +# The short X.Y version |
| 41 | #version = '' |
| 42 | |
| 43 | -# The full version, including alpha/beta/rc tags. |
| 44 | +# The full version, including alpha/beta/rc tags |
| 45 | #release = '' |
| 46 | |
| 47 | # There are two options for replacing |today|: either, you set today to some |
| 48 | @@ -27,34 +37,49 @@ today_fmt = '%Y-%m-%d' |
| 49 | |
| 50 | |
| 51 | # -- General configuration --------------------------------------------------- |
| 52 | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 53 | |
| 54 | -needs_sphinx = '4.0' |
| 55 | +# If your documentation needs a minimal Sphinx version, state it here. |
| 56 | +# |
| 57 | +needs_sphinx = '1.1' |
| 58 | + |
| 59 | +# Add any Sphinx extension module names here, as strings. They can be |
| 60 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 61 | +# ones. |
| 62 | extensions = [ |
| 63 | 'sphinx.ext.extlinks', |
| 64 | 'sphinx.ext.todo', |
| 65 | ] |
| 66 | |
| 67 | -def addExtensionIfExists(extension: str): |
| 68 | +def addExtensionIfExists(extension): |
| 69 | try: |
| 70 | - if importlib.util.find_spec(extension) is None: |
| 71 | - raise ModuleNotFoundError(extension) |
| 72 | - except (ImportError, ValueError): |
| 73 | - sys.stderr.write(f'WARNING: Extension {extension!r} not found. ' |
| 74 | - 'Some documentation may not build correctly.\n') |
| 75 | - else: |
| 76 | + __import__(extension) |
| 77 | extensions.append(extension) |
| 78 | + except ImportError: |
| 79 | + sys.stderr.write("Extension '%s' not found. " |
| 80 | + "Some documentation may not build correctly.\n" % extension) |
| 81 | |
| 82 | addExtensionIfExists('sphinxcontrib.doxylink') |
| 83 | |
| 84 | +# The master toctree document. |
| 85 | +master_doc = 'index' |
| 86 | + |
| 87 | +# Add any paths that contain templates here, relative to this directory. |
| 88 | templates_path = ['_templates'] |
| 89 | -exclude_patterns = ['Thumbs.db', '.DS_Store'] |
| 90 | + |
| 91 | +# List of patterns, relative to source directory, that match files and |
| 92 | +# directories to ignore when looking for source files. |
| 93 | +# This pattern also affects html_static_path and html_extra_path. |
| 94 | +exclude_patterns = [] |
| 95 | |
| 96 | |
| 97 | # -- Options for HTML output ------------------------------------------------- |
| 98 | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 99 | |
| 100 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 101 | +# a list of builtin themes. |
| 102 | +# |
| 103 | html_theme = 'named_data_theme' |
| 104 | + |
| 105 | +# Add any paths that contain custom themes here, relative to this directory. |
| 106 | html_theme_path = ['.'] |
| 107 | |
| 108 | # Add any paths that contain custom static files (such as style sheets) here, |
| 109 | @@ -62,31 +87,56 @@ html_theme_path = ['.'] |
| 110 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 111 | html_static_path = ['_static'] |
| 112 | |
| 113 | -html_copy_source = False |
| 114 | -html_show_sourcelink = False |
| 115 | |
| 116 | -# Disable syntax highlighting of code blocks by default. |
| 117 | -highlight_language = 'none' |
| 118 | +# -- Options for LaTeX output ------------------------------------------------ |
| 119 | + |
| 120 | +latex_elements = { |
| 121 | + # The paper size ('letterpaper' or 'a4paper'). |
| 122 | + # |
| 123 | + # 'papersize': 'letterpaper', |
| 124 | + |
| 125 | + # The font size ('10pt', '11pt' or '12pt'). |
| 126 | + # |
| 127 | + # 'pointsize': '10pt', |
| 128 | + |
| 129 | + # Additional stuff for the LaTeX preamble. |
| 130 | + # |
| 131 | + # 'preamble': '', |
| 132 | + |
| 133 | + # Latex figure (float) alignment |
| 134 | + # |
| 135 | + # 'figure_align': 'htbp', |
| 136 | +} |
| 137 | + |
| 138 | +# Grouping the document tree into LaTeX files. List of tuples |
| 139 | +# (source start file, target name, title, |
| 140 | +# author, documentclass [howto, manual, or own class]). |
| 141 | +latex_documents = [ |
| 142 | + ('index', 'nlsr-docs.tex', u'Named Data Link State Routing Protocol (NLSR)', |
| 143 | + author, 'manual'), |
| 144 | +] |
| 145 | |
| 146 | |
| 147 | # -- Options for manual page output ------------------------------------------ |
| 148 | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-manual-page-output |
| 149 | |
| 150 | # One entry per manual page. List of tuples |
| 151 | # (source start file, name, description, authors, manual section). |
| 152 | man_pages = [ |
| 153 | - ('manpages/nlsr', 'nlsr', 'Named Data Link State Routing daemon', [], 1), |
| 154 | - ('manpages/nlsr.conf', 'nlsr.conf', 'Named Data Link State Routing daemon configuration file', [], 5), |
| 155 | - ('manpages/nlsrc', 'nlsrc', 'command-line utility to interact with and collect statistics from NLSR', [], 1), |
| 156 | + ('manpages/nlsr', 'nlsr', u'Named Data Link State Routing daemon', None, 1), |
| 157 | + ('manpages/nlsr.conf', 'nlsr.conf', u'Named Data Link State Routing daemon configuration file', None, 5), |
| 158 | + ('manpages/nlsrc', 'nlsrc', u'command-line utility to interact with and collect statistics from NLSR', None, 1), |
| 159 | ] |
| 160 | |
| 161 | +# If true, show URL addresses after external links. |
| 162 | +#man_show_urls = True |
| 163 | + |
| 164 | |
| 165 | -# -- Misc options ------------------------------------------------------------ |
| 166 | +# -- Custom options ---------------------------------------------------------- |
| 167 | |
| 168 | doxylink = { |
| 169 | 'nlsr': ('NLSR.tag', 'doxygen/'), |
| 170 | } |
| 171 | |
| 172 | extlinks = { |
| 173 | - 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #%s'), |
| 174 | + 'issue': ('https://redmine.named-data.net/issues/%s', 'issue #'), |
| 175 | } |