Skip to main content

esp-doxybook

This is a tool that converts Doxygen XML output into a single-file API reference in Markdown format.

Live Demo

Requirements

You need to have python 3.7 or newer and Jinja2 package installed.

Memory usage

Needs up to 100MiB of memory. Parsing super large projects can use up to 0.5GiB of memory. For example, a project consisting of 1000 Doxygen xml files can use 550MiB of memory, but I would be worried more about VuePress or GitBook memory usage while using that many files.

Installation

Install using Python Pip: https://pypi.org/project/esp-doxybook/

Use with pre-commit

- repo: https://github.com/espressif/doxybook
  rev: v0.2.2
  hooks:
    - id: doxygen-api-md

The default path of the generated xml files is xml, make sure it's matching the path in your Doxyfile.

For example, if you have this in your Doxyfile:

OUTPUT_DIRECTORY       = ./doxygen_output

Then you need to set the path in the pre-commit config like this:

- repo: https://github.com/espressif/doxybook
  rev: v0.2.2
  hooks:
    - id: doxygen-api-md
      args: ["-i", "doxygen_output/xml", "-o", "docs/api.md"]

Make sure you've installed doxygen before you run pre-commit install. Otherwise, the hook will fail.

Compile the example

git clone https://github.com/espressif/doxybook.git

cd doxybook

# Install dependencies
python -m venv venv
source venv/bin/activate
pip install flit
flit install -s

# Let's take C project as an example
cd example/c
esp-doxybook -i temp/xml -o ../../docs/c_api.md

# Preview Markdown with MkDocs
cd ../../
mkdocs serve

Then go to http://localhost:8000/c_api/ to see the generated documentation.

Found a bug or want to request a feature?

Feel free to do it on GitHub issues

Pull requests

Pull requests are welcome

License

MIT License

Copyright (c) 2019 Matus Novak

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Additions Copyright (c) 2022 Espressif Systems (Shanghai) Co. Ltd.

Download files

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

Source Distribution

esp_doxybook-0.3.2.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esp_doxybook-0.3.2-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file esp_doxybook-0.3.2.tar.gz.

File metadata

  • Download URL: esp_doxybook-0.3.2.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for esp_doxybook-0.3.2.tar.gz
Algorithm Hash digest
SHA256 bc0c2ce6bf52f9942f87ee0fca50056c0f09bbef725b37648e38051e978f6464
MD5 6ac27111cfba18758f3de61f52943e5b
BLAKE2b-256 e344026128a5d5800162c47419af209b8197e5aed2846cc919d91a276918da03

See more details on using hashes here.

File details

Details for the file esp_doxybook-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: esp_doxybook-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for esp_doxybook-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75e82122e79c75114198c29192e10141001463111a1f78aa82a870ab4254140c
MD5 38debfc489ef7f922ceb3df598ec328a
BLAKE2b-256 6a68c6518029866c84e9efe9b47bad332d3184a96ae12328ebca167398f484b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page