Blame view

doc/doc_rst/make_rst_then_html 4.14 KB
9d8c5b5c   Etienne Pallier   Toute premiere ve...
1

89e6dc93   Etienne Pallier   reactivated guita...
2
3
4
5
6
7
echo 
echo "*****************************"
echo "* GENERATING SPHINX API DOC *"
echo "*****************************"
echo

9d8c5b5c   Etienne Pallier   Toute premiere ve...
8
9
10
11
12
13
14
15
# 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

89e6dc93   Etienne Pallier   reactivated guita...
16
17
# 1) GuitAstro package (ex celme)
ON=true
cd580cf7   Etienne Pallier   sphinx doc autoge...
18
19
echo
echo "- Guitastro : generating UML class diagrams and API doc"
89e6dc93   Etienne Pallier   reactivated guita...
20
echo "  -----------------------------------------------------"
cd580cf7   Etienne Pallier   sphinx doc autoge...
21
echo
9d8c5b5c   Etienne Pallier   Toute premiere ve...
22
# Doc au format de Alain
83cfb55c   Etienne Pallier   sphinx autodoc ge...
23
cd ../../vendor/guitastro/doc/doc_rst/
9d8c5b5c   Etienne Pallier   Toute premiere ve...
24
pwd
89e6dc93   Etienne Pallier   reactivated guita...
25
$ON && ./make_doc
33a270b3   Etienne Pallier   sphinx doc autoge...
26
#make html
83cfb55c   Etienne Pallier   sphinx autodoc ge...
27
#./MAKE_DOC.sh
89e6dc93   Etienne Pallier   reactivated guita...
28

9d8c5b5c   Etienne Pallier   Toute premiere ve...
29
30
31
32
33
34
35
36
37
38
# 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
89e6dc93   Etienne Pallier   reactivated guita...
39
40
41
42
43
44
45
46
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

9d8c5b5c   Etienne Pallier   Toute premiere ve...
47
48

# 3) pyros_django package
89e6dc93   Etienne Pallier   reactivated guita...
49
50
51
52
53
54
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
d9d66439   Etienne Pallier   sphinx doc autoge...
55
##sphinx-apidoc -f -o source -a --separate --module-first --tocfile pyros_django_package ../../src/core/pyros_django
9d8c5b5c   Etienne Pallier   Toute premiere ve...
56
57
58
#sphinx-apidoc -f -o source --tocfile pyros_django_package ../../src/core/pyros_django

# 4) Code style package
89e6dc93   Etienne Pallier   reactivated guita...
59
ON=true
cd580cf7   Etienne Pallier   sphinx doc autoge...
60
echo
89e6dc93   Etienne Pallier   reactivated guita...
61
62
echo "- Codestyle : generating UML class diagrams and API doc RST files"
echo "  ---------------------------------------------------------------"
cd580cf7   Etienne Pallier   sphinx doc autoge...
63
echo
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
64
65
echo "-- generating UML class diagrams in source/doc_images/generated/ (pyreverse)"
echo
33a270b3   Etienne Pallier   sphinx doc autoge...
66
67
68
cd ../codestyle_examples/
pyreverse -p codestyle_examples -o png codestyle_examples
cd -
83cfb55c   Etienne Pallier   sphinx autodoc ge...
69
mv ../codestyle_examples/*.png source/doc_images/generated/
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
70
echo
cd580cf7   Etienne Pallier   sphinx doc autoge...
71
echo "-- generating API doc RST files (Sphinx)"
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
72
echo
9d8c5b5c   Etienne Pallier   Toute premiere ve...
73
74
75
76
77
78
79
80
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/


89e6dc93   Etienne Pallier   reactivated guita...
81
82
83
84
85
86
87

##exit




# B - Generate PyROS HTML and PDF files (from RST)
61e4f022   Etienne Pallier   codestyle make_rs...
88
# -------------------------------------------
9d8c5b5c   Etienne Pallier   Toute premiere ve...
89

dc729fe1   Etienne Pallier   Sphinx autodoc ge...
90
echo
89e6dc93   Etienne Pallier   reactivated guita...
91
92
echo "- Generating PyROS API doc HTML files in build/html/index.html (from RST, with Sphinx)"
echo "  ------------------------------------------------------------------------------------"
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
93
94
95
96
echo
sphinx-build -b html ./source/ build/html/

echo
89e6dc93   Etienne Pallier   reactivated guita...
97
98
echo "- Generating PyROS API doc PDF file in build/pdf/Python.pdf (from RST, with Sphinx)"
echo "  ------------------------------------------------------------------------------------"
dc729fe1   Etienne Pallier   Sphinx autodoc ge...
99
100
echo
sphinx-build -b pdf source build/pdf/
89e6dc93   Etienne Pallier   reactivated guita...
101
102
103
104
105
106

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