Index: tools/document.sh =================================================================== diff -u -r6ab9b1c14952ed9afe17694c65068a08aa27481e -rc6596d42d995bed3789849bd85c83da5a3837fac --- tools/document.sh (.../document.sh) (revision 6ab9b1c14952ed9afe17694c65068a08aa27481e) +++ tools/document.sh (.../document.sh) (revision c6596d42d995bed3789849bd85c83da5a3837fac) @@ -14,8 +14,31 @@ # @brief Generates doxygen documentation # ############################################################################ +# Assumes you have already run the following setup: + +CURR_DIR=$(pwd) +if [[ "$@" == "*--setup*" ]]; then + sudo apt-get install python3-sphinx + mkdir -p ../docs/ + cd ../docs/ + + # must be run outside of venv + sphinx-quickstart + + read -p "Press 'Enter' once you have added dialin to the sys path in conf.py..." + source ../venv/bin/activate + pip3 install sphinx + cd $CURR_DIR +fi cd ../ -export PROJECT_DIRECTORY=$(pwd) -rm -rf document/html -doxygen document/Doxyfile -xdg-open document/html/index.html +sphinx-apidoc -o docs/source dialin +cd docs/ +if [[ "$@" == "*--clean*" ]]; then + make clean +fi +if [[ "$@" == "*--readme*" ]]; then + m2r ../README.md + mv ../README.rst source/ +fi +make html +xdg-open build/html/index.html