#!/bin/bash ########################################################################### # # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file document.sh # # @date 29-Apr-2020 # @author P. Lucia # # @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 ../ 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