Integrate your doxygen-generated technical documentation into Sphinx
Project description
Docleaf
Your technical docs, beautifully integrated
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. Please see the Docleaf Pricing page for more information.
If you have any questions please email: support@docleaf.io
Features
- Custom directives allowing you to target various parts of C and C++ code bases.
- Integration with Sphinx C and C++ domains to support easily linking to your generated output.
- Hash-based content checks, as well as timestamp checks, to minimize incremental build times after a Doxygen run.
- Integration with the
sphinx.ext.linkcode
extension to support links to source code locations in a GitHub repository.
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 extension to know where your source code is stored and the Doxygen XML output has been generated for your project. Optionally set the default project:
docleaf_projects = {
"my_project": {
"root": "../src",
"xml": "../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
All directives take a :project:
option to specify the project to use from your conf.py
if you don't want to use
the default project.
Settings
-
docleaf_projects
A Python dictionary mapping each project name to the folders where its source code and Doxygen XML output are 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 thehtmlonly
node.
Integration with sphinx.ext.linkcode
Docleaf can integrate with the sphinx.ext.linkcode
extension in order to add [source]
links next to various
supported entries in your documentation. Linking to GitHub based repositories is supported.
In order to use it, add the sphinx.ext.linkcode
extension to the extensions
list in your Sphinx conf.py
and use
the docleaf.doxygen.GitHubLinkResolver
with appropriate parameters for your repository.
extensions = [
"docleaf.doxygen",
"sphinx.ext.linkcode",
]
linkcode_resolve = docleaf.doxygen.GitHubLinkResolver(
root="../../../", user="docleaf-labs", repo="docleaf", branch="main"
)
Where:
root
is the relative path to the root of your repository.user
is the user or organisation name for your GitHub repository.repo
is the name of your GitHub repository.tag
is the git tag that you would like the generated link URLs to target.branch
is the git branch that you would like the generated link URLs to target.commit
is the git commit SHA that you would like the generated link URLs to target.
Only one of tag
, branch
and commit
is necessary.
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 rewriting the code base to use Rust. The user experience is designed to match and improve on Breathe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for docleaf-0.8.3-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8b31c87d8ab0acdcf408d63f2781dd68a285426d40dc80e82458e5ea230f2fd |
|
MD5 | c8dc522c309d2fdd3e1f4e83cf6ae088 |
|
BLAKE2b-256 | 1d17e09da81b44b8a277debe844b5720b46e628fe0d60818b26b6609c56d6630 |
Hashes for docleaf-0.8.3-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8de752d9f031652bafb4bb17a02e0661d9f4a238a36dff4519330ae311af848 |
|
MD5 | 29178f8d081fa5eb6d479c3b0658cbb7 |
|
BLAKE2b-256 | 68782e3c2a4ecc9b6e2d8b4e44096a392605c2a11862296edce82f8929be217f |
Hashes for docleaf-0.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6befc8d5197ad898e789a35467c8fab46bb2e04470d737366513f088355c779c |
|
MD5 | 03e445be203a8203146ae3f84b82c6f6 |
|
BLAKE2b-256 | 22a6308dccf083d020f24f8b1e77eda31814bcf462a587681700382fa028a030 |
Hashes for docleaf-0.8.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1b14ac912f86e8789aae94eed3351459d93b853343fb5907bc8bcfc51f51e09 |
|
MD5 | 189213cc1913ea8f27a426f3dc7bc2fe |
|
BLAKE2b-256 | 3506e7b7d13de12fbccb4aced83b4cd813f9495c5a4050dd6db93e0f9225bf95 |
Hashes for docleaf-0.8.3-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87fac917e0891b93bb727587b0c8cc03da99d4032bd2215f19f7d6791e179e9 |
|
MD5 | 17ae7fb9b91f4c0749be6e209b647ca1 |
|
BLAKE2b-256 | 39ce0cc124c41a97b10538365bb66daa065d91fffa66cc5ebafe01c661a8116a |
Hashes for docleaf-0.8.3-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd9aff9b56df94f469889a69f28962531d901d0178585aca6be390f7b5dc2f44 |
|
MD5 | eef237c8b71ed2ee1a552a2002060258 |
|
BLAKE2b-256 | 13fc1909395e3f0015800dbf053a525ce7ce801b90f2865f672ee216a6683166 |
Hashes for docleaf-0.8.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65e942d6e6559705c323d0eb0f536719de251ad215ec895db59e1be0ebb9814e |
|
MD5 | 49f59dc0edcfd22d9e33ab154ad0997d |
|
BLAKE2b-256 | 0be85cfdf44274b37c4b79324bd341dd34b356437a1424fe8359d1d6399c4e0c |
Hashes for docleaf-0.8.3-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad9495212c9e9b54dfcf89d8215425c74a0db410c4961902d4952307e359d601 |
|
MD5 | 847718cfe06569ab5d2381f017d520ab |
|
BLAKE2b-256 | 875cc276727bf61ef3064c0824ca8e11b75c4a866b17bb8494830d4cbd7f7e14 |
Hashes for docleaf-0.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db67cb629f8947ae1bc840ad8e80dce8be0b72de0aa157ee8e29e2e25e24a815 |
|
MD5 | fafea267068334d87242ae8fe188cff3 |
|
BLAKE2b-256 | 32bf4f733c2d25d9f7c137fff7bda3afef056070608ae3b66abbd6737158ee28 |
Hashes for docleaf-0.8.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab74832dacafa901681728c0e807c779566b2f55a88a392d99b4c9394a68c686 |
|
MD5 | b747f0bd1bda3b83fcb0ec7b4f1b5139 |
|
BLAKE2b-256 | f03f052754ff3c7e63bfc85f8c435badc45ff2831f4f66c261a77d6cf5715737 |
Hashes for docleaf-0.8.3-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25eefe573f86037c2b91aeb1040c305afb41478859ca4320f467a0ecd9852aff |
|
MD5 | ae077b8fb031ae3d0ea77388448a252a |
|
BLAKE2b-256 | 377d119a89fdd99031c702f585f486a8003bfc4b96779cdd74aa71aa0e17704a |
Hashes for docleaf-0.8.3-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0225a4cfc2fcf00cb53d13e46e78d1b531220e26381cfb93cb38c7f711d43015 |
|
MD5 | 55d8a494c54850af5a60026fed7261b0 |
|
BLAKE2b-256 | 273e3dfbbb9f3212567fe58f0d98c62f545ddd19d21d5e87b0e5806e5b6a5e7d |
Hashes for docleaf-0.8.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83365449b9d80fd1cf70862028e626c7aa5704de3901862232c2d821c83a9ae9 |
|
MD5 | 924dd5fe587e53d7051c386ffc2cf715 |
|
BLAKE2b-256 | 7d1b939f0e3203e5dae3783d3a2ef7d91b75cdc9f95ef5a5ac836ca8265477e6 |
Hashes for docleaf-0.8.3-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b3ba97dcd60d5b6415312ab238bcffefaa7b5420cb5d6d7cc2844bb6c9bc120 |
|
MD5 | 91e9f6165f90af7ca8ec60b245962711 |
|
BLAKE2b-256 | 7b87e857f20cfb094d4861ecffcf80a0b4a2826715e659e19bd7feb15fd0583f |
Hashes for docleaf-0.8.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e7c125146415e9e26807e907ac692eba230e6874f04e345393121f511775fad |
|
MD5 | f52fd811fbb76a88d654e6fa233d0afb |
|
BLAKE2b-256 | 90b2947dec092f184dd189a13555f890d13dd7f1533207a43e937932d096aad8 |
Hashes for docleaf-0.8.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f707b4856b6ee674cd0f360dc2b0b177e6dfb97021337a56a20efe660865928 |
|
MD5 | 19ba3feb846c67c17394de834004e763 |
|
BLAKE2b-256 | 5b87f638fa436e4128056891e74edd57d0b732b4df8cdb01939cdebea50ad157 |
Hashes for docleaf-0.8.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb89490e5d4fcb73c65562bb6f6a28e597ed9f5d3aaee7122b510da69382ecb |
|
MD5 | 3d730a7630d6ab397f095890c45ffdf6 |
|
BLAKE2b-256 | 7d68e14baf25ecf1ab8707f1dc93fb03dde5ae610be333a0b7a8ba6bc4a5ff2b |
Hashes for docleaf-0.8.3-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebd112b5361ab593390cb01623d15b005a96a66592504c5605fdf743269a8ac5 |
|
MD5 | c222cce31856503c9d16accf65d06be7 |
|
BLAKE2b-256 | 348d031695eb71da94fb52023ee28d352aa7ed3e6b315e40925a87d691474c40 |
Hashes for docleaf-0.8.3-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c36b54e28270ce760a72728cb479b10a4bad1f1183c73e4f73a7039af3b365b |
|
MD5 | f58ae91d9c99afa755cb439cb7b873cd |
|
BLAKE2b-256 | 9ad9a8889b4d5faf20b0a4b0a912045ab873cdcbbc0198d1bbf75099bcb7e18e |
Hashes for docleaf-0.8.3-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26763d121ccd60d067d0e0fdf08df93a603d9119c59bf5a094bae750ee738792 |
|
MD5 | dac9de8162a6fd9f69591d34686d53c3 |
|
BLAKE2b-256 | 90b415573604d57b6c8944c17f55c2dd6ffb8f571f5de3cf380c33e140c7057f |
Hashes for docleaf-0.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d3c68116ceea51c466b0e26777d0f7acbb749858edf1501e382aa1f837a334 |
|
MD5 | bdf58f0540b86b73e7f9cc00d6291613 |
|
BLAKE2b-256 | 7aecfcc37bf053f13c09090cce64e5b6667a7d8a1031a75a094a9e68939449f1 |
Hashes for docleaf-0.8.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ff2f72fc71443eb5b43a7e4094ecb8b7c5239dcf925286c9d1390cb2e99efd |
|
MD5 | 89ba80f90ccb9465cab572fe4ba1bbeb |
|
BLAKE2b-256 | 9f90acaa46bc52511fee9e3531c7e30425c48ac6aae69aca8c844aa031569169 |
Hashes for docleaf-0.8.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdbed3a871f7d42bcbd5bbf70af780e8d0dcda9c420893348063bf2fbb93993c |
|
MD5 | 77bdcbea32b87f69c2bc60d2cd3a924e |
|
BLAKE2b-256 | dc544fa3c8b398128ee1cd36c88a65f1ef5f0d302cbc0af18cb15efa47015d17 |
Hashes for docleaf-0.8.3-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b0ad798d3c797250baf8ffade0e80fb18ac163ad295732537283c130c6166e1 |
|
MD5 | 58b811395ae9f33a20adcc2820da363b |
|
BLAKE2b-256 | 3091b6c4d423af90a93e9fc4bb5fe2e463d28a71996f17146a9ab717c03f4446 |
Hashes for docleaf-0.8.3-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2ec56ab14756e66a6ed4eabc965206a06d7d6482cf782cc4d883b4e166e3c2 |
|
MD5 | 4a6cad1ecc2501514eeba7b070d301aa |
|
BLAKE2b-256 | 532d524e4ff578338b121961a3fc5fa28f5b2d28c467d196635b21cc43f357d9 |
Hashes for docleaf-0.8.3-cp37-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 055bc10e31561697403d501570ce63402acd4e2ac2eef6c37e6313835c5f5922 |
|
MD5 | e022fe4256c6386417ba0dc24c1f619f |
|
BLAKE2b-256 | 21934742717aeed967af83faf8d48511b8e13a445f1a1f748ddd9b8de57195cf |
Hashes for docleaf-0.8.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8d3164289ebaf562f9351053c76af5b3ea4d77ce8541173c57fb891e2556aeb |
|
MD5 | fc3c0bd9bb04ee994894a0dc8658a320 |
|
BLAKE2b-256 | 092db154f9554f258a7ba94d1320ed9e26c077778226ca9efce1756341b47d29 |
Hashes for docleaf-0.8.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 353d5a5b4dd2f388357be6cfb51914fb2e3c0b96e32c79adebd6c1d34bf8a5cb |
|
MD5 | 4da0df05aad5cf63b4800bf048371f5e |
|
BLAKE2b-256 | 666276b5af52acefc3a9f11bf9f01aeab95c7076e241b4aa10d52f4719257010 |
Hashes for docleaf-0.8.3-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b40d4e7f8c313ad348366ee3158bbd0720de5a45b8a029bbb99bf8d4204226e1 |
|
MD5 | 69a0b1ce695397627198bf99c206a4f1 |
|
BLAKE2b-256 | a96a756a17bff666f7b8b349f578d622622fff89c82965e87c76c6bbd471a2f2 |
Hashes for docleaf-0.8.3-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0561ae269c7bbac7597e5a2470e1d957cc8b1978c58eeadbbec8fd3d60547a7b |
|
MD5 | 709946b01cdb5349b375cc922149e77a |
|
BLAKE2b-256 | 371c8d82a360ef47023f34c53c41a97733d64de35707afd0850ee3168cd9551e |