-
Notifications
You must be signed in to change notification settings - Fork 6
/
conf.py
177 lines (158 loc) · 6.31 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'elos'
copyright = '2023, [email protected]'
author = '[email protected]'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinxcontrib.programoutput',
'sphinxcontrib.plantuml',
'sphinx_favicon',
"sphinx.ext.autosectionlabel", # better cross referencing
# copy button on code blocks in HTML doc
'sphinx_copybutton',
# for code documentation & referencing
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx_c_autodoc',
'sphinx_c_autodoc.napoleon',
'sphinx_c_autodoc.viewcode',
]
myst_enable_extensions = ["tasklist"]
autosectionlabel_prefix_document = True
autosectionlabel_maxdepth = 2
templates_path = ['doc/_templates']
exclude_patterns = ['build/deps/**', 'build/*/cmake/_deps/*', 'README.md', '.venv']
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
language = 'en'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster'
html_static_path = ['doc/static']
html_logo = 'doc/static/elos_blue.png'
favicons = [
"favicon_16x16.png",
"favicon_32x32.png",
]
# plantuml
plantuml_output_format = 'png'
plantuml_batch_size = 100
plantuml_cache_path = 'build/_plantum'
# c-autodoc
c_autodoc_roots = [
'./src/',
'./src/common/interface',
'./src/components/clientmanager/interface',
'./src/components/clientmanager/private',
'./src/components/clientmanager/public',
'./src/components/config/interface',
'./src/components/config/private',
'./src/components/config/public',
'./src/components/eloslog/interface',
'./src/components/eloslog/private',
'./src/components/eloslog/public',
'./src/components/event/interface',
'./src/components/event/private',
'./src/components/event/public',
'./src/components/eventbuffer/interface',
'./src/components/eventbuffer/private',
'./src/components/eventbuffer/public',
'./src/components/eventdispatcher/interface',
'./src/components/eventdispatcher/private',
'./src/components/eventdispatcher/public',
'./src/components/eventfilter/interface',
'./src/components/eventfilter/private',
'./src/components/eventfilter/public',
'./src/components/eventlogging/interface',
'./src/components/eventlogging/private',
'./src/components/eventlogging/public',
'./src/components/eventprocessor/interface',
'./src/components/eventprocessor/private',
'./src/components/eventprocessor/public',
'./src/components/logger/interface',
'./src/components/logger/private',
'./src/components/logger/public',
'./src/components/plugincontrol/interface',
'./src/components/plugincontrol/private',
'./src/components/plugincontrol/public',
'./src/components/pluginmanager/interface',
'./src/components/pluginmanager/private',
'./src/components/pluginmanager/public',
'./src/components/processfilter/interface',
'./src/components/processfilter/private',
'./src/components/processfilter/public',
'./src/components/rpnfilter/interface',
'./src/components/rpnfilter/private',
'./src/components/rpnfilter/public',
'./src/components/scannermanager/interface',
'./src/components/scannermanager/private',
'./src/components/scannermanager/public',
'./src/components/storagemanager/interface',
'./src/components/storagemanager/private',
'./src/components/storagemanager/public',
'./src/libelos/public',
'./src/libelos/public/elos',
'./src/libelos_lite/public',
'./src/libelosdlt/interface',
'./src/libelosdlt/private',
'./src/libelosdlt/public',
'./src/libelosplugin/interface',
'./src/libelosplugin/private',
'./src/libelosplugin/public',
'./src/plugins/clients/tcp/interface/',
'./src/plugins/clients/tcp/interface/connectionmanager',
'./src/plugins/clients/tcp/interface/messagehandler',
'./src/plugins/clients/tcp/private/',
'./src/plugins/clients/tcp/private/connectionmanager',
'./src/plugins/clients/tcp/private/messagehandler',
'./src/plugins/clients/tcp/public/',
'./src/plugins/clients/tcp/public/connectionmanager',
'./src/plugins/clients/tcp/public/messagehandler',
'./src/plugins/scanners/oomkiller/interface/',
'./src/plugins/scanners/oomkiller/private/',
'./src/plugins/scanners/kmsg/interface/',
'./src/plugins/scanners/kmsg/private/',
'./src/plugins/scanners/shmem/interface/',
'./src/plugins/scanners/shmem/private/',
'./src/plugins/scanners/syslog/interface/',
'./src/plugins/scanners/syslog/private/',
'./src/plugins/storagebackends/dlt/interface/',
'./src/plugins/storagebackends/dlt/private/',
'./src/plugins/storagebackends/influxdbbackend/interface/',
'./src/plugins/storagebackends/influxdbbackend/private/',
'./src/plugins/storagebackends/jsonbackend/interface/',
'./src/plugins/storagebackends/jsonbackend/private/',
'./src/plugins/storagebackends/nosqlbackend/interface/',
'./src/plugins/storagebackends/nosqlbackend/private/',
'./src/plugins/storagebackends/sqlbackend/interface/',
'./src/plugins/storagebackends/sqlbackend/private/',
]
c_autodoc_compilation_args = [
# '-DSPHINX_C_AUTODOC_USE_BROKEN_FUNC_POINTER_TYPEDEFS',
]
c_autodoc_ignore_statements = [
'__BEGIN_DECLS',
'__END_DECLS',
]
set_type_checking_flag = True
import os
def pre_process_C_files(app, filename, contents, *args):
_, file_ext = os.path.splitext(filename)
if file_ext == '.h':
modified_contents = contents[0]
for element in c_autodoc_ignore_statements:
modified_contents = modified_contents.replace(element, '')
contents[:] = [modified_contents]
def setup(sphinx):
sphinx.connect("c-autodoc-pre-process", pre_process_C_files)