Use Doxygen to generate the API documentation. (#1558)

* Integrated Doxygen documentation into Sphinx

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2022-05-29 13:44:52 +02:00
committed by GitHub
parent 33f9729ee4
commit 6b7b23b01d
11 changed files with 2728 additions and 25 deletions
+2658
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -22,8 +22,8 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " release to make standalone HTML files for ntop documentation release"
@echo " html to make standalone HTML files"
@echo " release to make standalone Doxygen/HTML files for ntop documentation release"
@echo " html to make standalone Doxygen/HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@@ -50,12 +50,15 @@ help:
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
cd doxygen; make clean
rm -rf $(BUILDDIR)/* api doxygen
.PHONY: html
html:
cd doxygen; make
@test -r Doxyfile.cfg || { \
echo 'Doxyfile.cfg does not exist; Please run $(realpath ..)/autogen.sh or $(realpath ..)/configure first.'; \
false; \
}
doxygen Doxyfile.cfg
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-4
View File
@@ -1,4 +0,0 @@
nDPI Programming API
####################
Placeholder
+16 -3
View File
@@ -21,7 +21,8 @@ sys.path.append( "breathe/" )
# ones.
extensions = [
'sphinx.ext.intersphinx',
'breathe'
'breathe',
'exhale'
]
# Workaround for platforms where swaggerdoc is not available
@@ -31,6 +32,18 @@ if not os.environ.get("PYTHON_SKIP_SWAGGERDOC"):
breathe_projects = { "apidoc" : "doxygen/xml/" }
breathe_default_project = "apidoc"
exhale_args = {
"containmentFolder": "./api",
"rootFileName": "library_root.rst",
"rootFileTitle": "Library API",
"doxygenStripFromPath": ".",
"createTreeView": True,
# "treeViewIsBootstrap": True,
}
primary_domain = 'c'
highlight_language = 'c'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -139,7 +152,7 @@ html_logo = "img/logo.png"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@@ -288,4 +301,4 @@ texinfo_documents = [
intersphinx_mapping = {'https://docs.python.org/': None}
def setup(app):
app.add_stylesheet('css/ntop.css')
app.add_css_file('css/ntop.css')
+1 -1
View File
@@ -13,7 +13,7 @@ nDPI is an open source DPI (Deep Packet Inspection) toolkit for traffic analysis
:maxdepth: 2
:caption: Developer's Guide
api
api/library_root
flow_risks
.. toctree::
+4
View File
@@ -0,0 +1,4 @@
breathe
exhale
sphinx-rtd-theme
sphinxcontrib-swaggerdoc