Fix sphinx warnings (and some formatting)
[docs.git] / makeRST.sh
1 #!/bin/bash
2
3 # This script compiles documenatation from asciidoc source by
4 # converting  asciidoc to reStructedText automatically using
5 # asciidoctor maven plug in and pandoc (http://www.pandoc.org/).
6 #
7 # Please make sure you have pandoc (http://www.pandoc.org/), sphinx
8 # (http://www.sphinx-doc.org/) and sphinx-bootstrap-theme(https://ryan-roemer.github.io/sphinx-bootstrap-theme/) installed.
9
10 cwd=$(pwd)
11 cp -r $cwd/docs/getting-started-guide $cwd/docs_autotranslation/getting-started-guide
12 cp -r $cwd/docs/opendaylight-with-openstack $cwd/docs_autotranslation/opendaylight-with-openstack
13 cp -r $cwd/docs/_static $cwd/docs_autotranslation/_static
14 docs='developer-guide user-guide'
15 for i in $docs
16 do
17     echo "Translating $i ..."
18     cd $cwd/manuals/$i
19     mvn clean compile
20     cp -r $cwd/manuals/$i/target/generated-docs $cwd/docs_autotranslation/$i
21     mvn clean
22     cd $cwd/docs_autotranslation/$i
23     pandoc -f docbook -t rst -s *.xml -o index.rst
24 done
25
26 cd $cwd/docs_autotranslation
27 ./split.py -i developer-guide/index.rst
28 ./split.py -i user-guide/index.rst
29
30 sphinx-build -b html $cwd/docs_autotranslation $cwd/docs_autotranslation/html
31
32