diff options
author | skullydazed <[email protected]> | 2018-03-21 23:50:38 -0700 |
---|---|---|
committer | Jack Humbert <[email protected]> | 2018-03-22 02:50:38 -0400 |
commit | 7c9d5ace143d3cc6d767a354acde814926d566fd (patch) | |
tree | 1f2b581b6c9f6278a9e180bfcc8dd86b0a7fd2ef /util/generate_api_docs.sh | |
parent | f0932a8716dc946322c5ebae7f75eaa275c6220c (diff) | |
download | qmk_firmware-7c9d5ace143d3cc6d767a354acde814926d566fd.tar.gz qmk_firmware-7c9d5ace143d3cc6d767a354acde814926d566fd.zip |
Generate API docs from source code comments (#2491)
* Generate api docs from source code
* Add a bunch of doxygen comments
* more doxygen comments
* Add the in-progress api docs
* script to generate docs from travis
* Add doc generation to the travis job
* make travis_docs.sh commit the work it does
* make sure the docs script exits cleanly
Diffstat (limited to 'util/generate_api_docs.sh')
-rwxr-xr-x | util/generate_api_docs.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/util/generate_api_docs.sh b/util/generate_api_docs.sh new file mode 100755 index 0000000000..8d7ec3101f --- /dev/null +++ b/util/generate_api_docs.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -x + +if ! doxygen -v 2>&1 > /dev/null; then + echo "doxygen not found! Please install it!" + exit 1 +elif ! moxygen -V 2>&1 > /dev/null; then + echo -n "moxygen not found! Would you like to install it? [y/n] " + read ANSWER + case $ANSWER in + y|Y|yes|YES|Yes) + npm install -g moxygen + ;; + *) + exit 1 + ;; + esac +fi + +if [ ! -e Doxyfile ]; then + echo "Error: You must run this from the top-level qmk_firmware directory!" + exit 1 +fi + +# Generate the doxygen XML files +rm -rf doxygen +doxygen Doxyfile + +# Generate the moxygen Markdown files +moxygen -a -g -o docs/api_%s.md doxygen/xml |