make_rst_then_html
4.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
echo
echo "*****************************"
echo "* GENERATING SPHINX API DOC *"
echo "*****************************"
echo
# 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 (ex celme)
ON=true
echo
echo "- Guitastro : generating UML class diagrams and API doc"
echo " -----------------------------------------------------"
echo
# Doc au format de Alain
cd ../../vendor/guitastro/doc/doc_rst/
pwd
$ON && ./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
ON=false
echo
echo "- PyROS DeviceController : generating API doc RST files (Sphinx)"
echo " --------------------------------------------------------------"
echo
$ON && sphinx-apidoc -f -o source/generated_api -a --separate --module-first --tocfile device_controller_package ../../src/device_controller
#sphinx-apidoc -o source -a --separate --module-first --tocfile device_controller_package ../../src/device_controller
# 3) pyros_django package
ON=false
echo
echo "- PyROS django core : generating API doc RST files (Sphinx)"
echo " --------------------------------------------------------------"
echo
$ON && 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
ON=true
echo
echo "- Codestyle : generating UML class diagrams and API doc RST files"
echo " ---------------------------------------------------------------"
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/
##exit
# B - Generate PyROS HTML and PDF files (from RST)
# -------------------------------------------
echo
echo "- Generating PyROS API doc HTML files in build/html/index.html (from RST, with Sphinx)"
echo " ------------------------------------------------------------------------------------"
echo
sphinx-build -b html ./source/ build/html/
echo
echo "- Generating PyROS API doc PDF file in build/pdf/Python.pdf (from RST, with Sphinx)"
echo " ------------------------------------------------------------------------------------"
echo
sphinx-build -b pdf source build/pdf/
echo
echo "**************************************************************************************************************************************"
echo "NOW, YOU CAN VIEW THE API DOCUMENTATION BY POINTING YOUR LOCAL BROWSER TO : doc/doc_rst/build/html/index.html (from PyROS root folder)"
echo "**************************************************************************************************************************************"
echo