Doxygen XML to Markdown (or JSON)
I have decided to archive this repository. This has been a great experience and it makes me happy that many of you have found this tool useful. I wish that I did a better job with the quality of the code, and mainly with maintaining it. This project was started as a toy and I never expected it to become popular. I am archiving this repository because I want to focus on other things in my life, and my free time has been occupied by other events. Moreover, I have started to have a burnout programming. If anyone wishes to continue working on this project, please fork it and feel free to contact me (see my GitHub bio for contact details).
Please also consider using the following alternatives:
Doxygen XML to Markdown (or JSON) converter. Generate beautiful C++ documentation by converting Doxygen XML output into markdown pages via MkDocs, Hugo, VuePress, GitBook, Docsify, or your custom generator. Also comes with an optional templating mechanism and extensive configuration file.
This is a command line tool that converts Doxygen generated XML files into markdown files (or JSON). You can use the generated Markdown files to create beautiful C++ documentation using with MkDocs, GitBook, VuePress, Hugo, Docsify, or any other static site generator that supports markdown. This project is a successor of doxybook which was a Python based tool that did the exact same thing. I have decided to created this next version (doxybook2) in C++ in order to get better memory usage, templating, and overall better customization. This project is not limited to only the static site generators listed here, you can use any other one. The config file will help you to acomplish that by specifying the behavior or file names, relative links, etc. If you don't prefer the Markdown output generated by this tool, you can always make your own templates and supply them into this tool via the command line. If you don't want to bother with the templates, you can siply generate JSON only output (which contains partial Markdown for some things such as brief and detailed description), and use your own tool to create documentation you want.
This project is not perfect and I will never claim it will be. It does its job as best it can. There will be some weird edge cases in which the markdown will not be properly generated. I can't catch all of those cases on my own. Feel free to submit an issue here on GitHub to let me know if you have found something.
More screenshots
| Demo | Generator | Theme | Config |
|---|---|---|---|
| Link | Hugo | Learn | .doxybook |
| Link | Hugo | Book | .doxybook |
| Link | MkDocs | ReadTheDocs | .doxybook |
| Link | MkDocs | Material | .doxybook |
| Link | MkDocs | Bootswatch | .doxybook |
| Link | VuePress | Default | .doxybook |
| Link | GitBook | Default | .doxybook |
| N/A | Docsify | Default | .doxybook |
| Link | Original Doxygen | N/A | N/A |
Source markdown files for these examples above:
First, compile the doxybook2 and then run examples.bat or examples.sh in the root folder of this repository.
This tool has been compiled and tested on Windows (win32 and win64), Linux (amd64 and arm64), and OSX (amd64). Using any other architecture, such as power PC, is not guaranteed to work. You will also need Doxygen 1.8.16 or newer. Doxygen 1.8.15 is supported but I do not recommend it. Windows arm64 is not tested and not supported at this moment. No extra OS dependencies needed (everything is done via git vcpkg as linked statically), simply download the executable file from the GitHub release page. If using Windows, you will need Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019.
Go to https://github.com/matusnovak/doxybook2/releases and download the precompiled binary in the zip file for your target platform. The windows release needs Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. The binary file doxybook2.exe is located in the bin folder in the zip file, put it somewhere in your system and add it to the OS PATH environment variable.
To install from source, simply clone the repository, install the dependencies listed in the vcpkg.txt file, and use CMake + vcpkg toolchain to build it. No extra steps required.
Requirements:
…You only need Doxygen, doxybook2 from this repository, and some markdown static site generator.
Doxyfile contains GENERATE_XML = YES and XML_OUTPUT = xml. A sample Doxyfile is provided in the example/Doxyfile folder in this repository.doxygen in terminal in the same directory as your Doxyfile.doxybook2 --input path/to/doxygen/xml --output path/to/destinationI highly suggest reading through the Config or looking into example/xyz/.doxybook/config.json files, and then using the config as --config path/to/config.json.
…Note, --config-data can be used on top of --config to overwrite config properties. Example on Windows terminal (double "" escapes the double quote):
doxybook2 ... --config-data "{""linkSuffix"": """"}"Or Linux bash:
doxybook2 ... --config-data '{"linkSuffix": ""}'GitBook requires that your SUMMARY.md file contains all of the other markdown files. If the markdown file is not listed in here, it will not be generated into a HTML file. Therefore, using --summary-input and --summary-output you can generate a SUMMARY.md file. This works by creating a "template", let's call it SUMMARY.md.tmpl. This template file will not get modified by doxybook2. You will need to put in any links you see fit (external links? other markdown files?), and then you will need to add {{doxygen}} (including the double curly backets) somewhere in this template summary. Note that the indentation of {{doxygen}} matters and will affect the output! Example:
# Doxybook2 Example
* [Introduction](README.md)
{{doxygen}}
* [GitHub](https://github.com/matusnovak/doxybook2)And when running:
doxybook2 \
--input ... \
--output ... \
--config ... \
--summary-input path/to/SUMMARY.md.tmpl \
--summary-output path/to/SUMMARY.mdThe `pa
No open issues yet, or sync has not completed.