Skip to main content

Integrate your doxygen-generated technical documentation into Sphinx

Project description

Docleaf

Docleaf smoothly integrates your technical and long-form documentation. It is a Sphinx extension which reads Doxygen XML output and formats the information seamlessly with your user documentation.

License

Docleaf is licensed under the Parity Public License. The Parity license allows permissive use of Docleaf to help document open source projects. If you have a closed source project that you would like to document with Docleaf then you must purchase a commercial license. For further information please email support@docleaf.io.

Installation

Docleaf can be installed from PyPI:

pip install docleaf

Usage

Include docleaf.doxygen as an extension in your Sphinx conf.py file:

extensions = ["docleaf.doxygen"]

Configure the extenion to know where the Doxygen XML output has been generated for your project and optionally set the default project:

docleaf_projects = {
  "my_project": "../doxygen/xml"
}
docleaf_default_project = "my_project"

The use the provided directives in your reStructuredText files:

.. doxygenstruct:: ExampleStruct

See below for available directives.

Directives

Generate documentation for a C++ class.

.. doxygenclass:: ClassName

Generate documentation for a C or C++ struct.

.. doxygenstruct:: StructName

Generate documentation for a C or C++ function.

.. doxygenfunction:: function_name

Generate documentation for a C or C++ enum.

.. doxygenenum:: EnumName

Generate documentation for specific group as specified within your Doxygen set up and code comments.

.. doxygengroup:: group_name

Settings

  • docleaf_projects

    A Python dictionary mapping each project name to the folder where its Doxygen XML output is stored.

  • docleaf_default_project

    The default project to use when none is specified on the directive itself.

  • docleaf_domain_by_extension

    A Python dictionary mapping from file extension to Sphinx domain. Docleaf uses Doxygen's language classifications where possible but for optimal control of how source files are classified it is useful to use this setting. For example:

    docleaf_domain_by_extension = {"hpp": "cpp", "h": "c"}
    

    Will make sure that all files that end in .hpp will be considered as C++ files and processed using the C++ Sphinx domain whilst files that end in .h will be considered C files and processed with the C Sphinx domain.

  • docleaf_doxygen_skip

    A list of instructions describing any parts of the Doxygen XML to skip when generating the output documentation. Supported entries are:

    • members:all_caps - Skips any function or variable members (as defined as a 'memberdef' by Doxygen) which have names which are all capital letters and underscores. This is to allow users to filter our unprocessed C/C++ macros if desirable.
    • xml-nodes:<node name> - Skips reading and process of the given XML node and its children in the Doxygen XML output. Support is limited to the htmlonly node.

Performance

When doing a clean build of the Zephyr RTOS documentation suite, Docleaf is 2.1x faster than Breathe.

Benchmark: docleaf
  Time (mean ± σ):     180.383 s ±  3.213 s    [User: 448.242 s, System: 12.908 s]
  Range (min … max):   175.695 s … 185.187 s    10 runs
Benchmark: breathe
  Time (mean ± σ):     389.658 s ±  5.271 s    [User: 1839.366 s, System: 24.895 s]
  Range (min … max):   379.093 s … 394.315 s    10 runs

History

Docleaf is written and maintained by the creator of the Breathe project. It was created to resolve some of the performance and memory consumption issues with Breathe by re-writing the code base to use Rust. The user experience is designed to match Breathe.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

docleaf-0.3.0-cp311-none-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

docleaf-0.3.0-cp311-none-win32.whl (993.1 kB view hashes)

Uploaded CPython 3.11 Windows x86

docleaf-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

docleaf-0.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

docleaf-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

docleaf-0.3.0-cp311-cp311-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.11 macOS 10.7+ x86-64

docleaf-0.3.0-cp310-none-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

docleaf-0.3.0-cp310-none-win32.whl (993.1 kB view hashes)

Uploaded CPython 3.10 Windows x86

docleaf-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

docleaf-0.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

docleaf-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

docleaf-0.3.0-cp310-cp310-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

docleaf-0.3.0-cp39-none-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

docleaf-0.3.0-cp39-none-win32.whl (993.0 kB view hashes)

Uploaded CPython 3.9 Windows x86

docleaf-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

docleaf-0.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

docleaf-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

docleaf-0.3.0-cp39-cp39-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

docleaf-0.3.0-cp38-none-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

docleaf-0.3.0-cp38-none-win32.whl (993.1 kB view hashes)

Uploaded CPython 3.8 Windows x86

docleaf-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

docleaf-0.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

docleaf-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

docleaf-0.3.0-cp38-cp38-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 macOS 10.7+ x86-64

docleaf-0.3.0-cp37-none-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

docleaf-0.3.0-cp37-none-win32.whl (993.0 kB view hashes)

Uploaded CPython 3.7 Windows x86

docleaf-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

docleaf-0.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

docleaf-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.5 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

docleaf-0.3.0-cp37-cp37m-macosx_10_7_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page