Antidox: Use Doxygen sanely from within Sphinx
An antidote to doxy-madness
Summary
antidox is a Sphinx extension that can read Doxygen XML “databases” and insert documentation for entities in Sphinx documents, similar to Breathe.
It is intended to be fast and simple, though easily customizable.
Document generation (i.e. conversion between doxy-xml and reStructuredText) is driven by XML stylesheets (powered by lxml,) while indexing and selection of documentable entities is done by a SQL database (sqlite3.)
Here is an example project showing showing this extension in action.
Example usage
Generate the documentation for an entire header, and include all entities defined in that header:
.. doxy:c:: lua_run.h::*
:children:
The syntax <path>::<identifier> can be used to disambiguate between entities with the same name in different files.
To document a Doxygen group:
.. doxy:c:: [CborPretty]
:children:
You can manually specify which children should be documented:
.. doxy:c:: be_uint16_t
:children: u16
Cross references are provided by a custom role, e.g.:
:doxy:r:`be_uint16_t::u16`
The complete syntax is decribed in the docs.
Stub generation
The gen_stubs.py script shows how stub files can be automatically generated. You can adapt this script to your own project.
Generating API docs this way is fast and convenient, but may be suboptimal, since the spirit of this extension (and of Sphinx) is to generate narrative documentation and not merely an API reference.
Note: Beta
Though usable, this extension is still under development. Backwards compatibility will be kept for all releases with the same major/minor version.
Be aware, however, that after updating this extension you may need to do a clean build of your docs to see the results.
Objectives
Reuse API docs made with Doxygen in a Sphinx project.
Provide a smooth transition between 100% automatic API docs (what Doxygen generates) and semi-manual documentation (autodoc-style).
Have sensible defaults for automatic documentation generation while allowing customization.
Deal with big projects efficiently: the main tool in use now (Breathe) has resource usage issues when dealing with large XML files.
Metadata
Release files for antidox 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| antidox-0.2.1.tar.gz | 33.9 kB | Without provenance | Details for antidox-0.2.1.tar.gz |
Release files / antidox-0.2.1.tar.gz
| Download URL | antidox-0.2.1.tar.gz |
|---|---|
| Size | 33.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e7453544451f3073ed792c5308306a7475a9334804960a0a6774b317c58464d
|
|
BLAKE2b-256 checksum How to use checksums |
d25871c7dc3f60f1ded58be7f8b24056e3c1615d32d3842ce62cc3e15b3e7097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|
Security for antidox 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.