make_rst_then_html 2.76 KB

# A - Generate RST files
# ---------------------------------

#SPHINX_APIDOC_OPTIONS=autosummary,autosummary-no-nesting,members,undoc-members,show-inheritance
##export SPHINX_APIDOC_OPTIONS=members,undoc-members,show-inheritance,autosummary,autosummary-no-nesting

#sphinx-apidoc -f -o source ../../src/core

# 1) guitastro package (celme)
echo
echo "- Guitastro : generating UML class diagrams and API doc"
echo
# Doc au format de Alain
cd ../../vendor/guitastro/doc/doc_rst/
pwd
./make_doc
#make html
#./MAKE_DOC.sh
# Doc au format de Etienne (just uncomment 1st line)
###sphinx-apidoc -f -o source/generated_api -a --separate --tocfile guitastro_package ../../vendor/guitastro
###sphinx-apidoc -f -o source/generated_api -a --separate --module-first --tocfile guitastro_package ../../vendor/guitastro
#sphinx-apidoc -f -o source -a --separate --module-first --tocfile guitastro_package ../../vendor/guitastro
#sphinx-apidoc -f -o source -a --separate --module-first --tocfile celme_package ../../src/core/celme
#sphinx-apidoc -o source --tocfile celme_package ../../src/core/celme
cd -
pwd

# 2) device_controller package
######sphinx-apidoc -o source -a --separate --module-first --tocfile device_controller_package ../../src/device_controller

# 3) pyros_django package
######sphinx-apidoc -f -o source/generated_api -a --separate --module-first --tocfile pyros_django_package ../../src/core/pyros_django
##sphinx-apidoc -f -o source -a --separate --module-first --tocfile pyros_django_package ../../src/core/pyros_django
#sphinx-apidoc -f -o source --tocfile pyros_django_package ../../src/core/pyros_django

# 4) Code style package
echo
echo "- Codestyle : generating UML class diagrams and API doc"
echo
echo "-- generating UML class diagrams in source/doc_images/generated/ (pyreverse)"
echo
cd ../codestyle_examples/
pyreverse -p codestyle_examples -o png codestyle_examples
cd -
mv ../codestyle_examples/*.png source/doc_images/generated/
echo
echo "-- generating API doc RST files (Sphinx)"
echo
sphinx-apidoc -f -o source/generated_api -a --separate --module-first --tocfile codestyle_examples_package ../codestyle_examples
##sphinx-apidoc -f -o source -a --separate --module-first --tocfile codestyle_examples_package ../codestyle_examples
#sphinx-apidoc -o source -a --separate --module-first --tocfile code_style_package ../code_style/my_package1

#sphinx-apidoc -f -o source ../../src
#sphinx-apidoc -f -o --implicit-namespaces source ../../src/


# B - Generate HTML (and pdf) files (from RST)
# ---------------------------------

echo
echo "-- generating API doc HTML files in build/html/index.html (from RST, with Sphinx)"
echo
sphinx-build -b html ./source/ build/html/

echo
echo "-- generating API doc HTML files in build/pdf/Python.pdf (from RST, with Sphinx)"
echo
sphinx-build -b pdf source build/pdf/