Merge "Add odlparent documentation"
[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/) and sphinx
8 # (http://www.sphinx-doc.org/) installed.
9
10 cwd=$(pwd)
11 cp -r $cwd/docs/getting-started-guide $cwd/docs_autotranslation/getting-started-guide
12 cp -r $cwd/docs/_static $cwd/docs_autotranslation/_static
13 docs='howto-openstack developer-guide user-guide'
14 for i in $docs
15  do
16         echo "Translating $i ..."
17         cd $cwd/manuals/$i
18         mvn clean compile
19         cp -r $cwd/manuals/$i/target/generated-docs $cwd/docs_autotranslation/$i
20         mvn clean
21         cd $cwd/docs_autotranslation/$i
22         pandoc -f docbook -t rst -s *.xml -o index.rst
23  done
24
25
26 sphinx-build -b html $cwd/docs_autotranslation $cwd/docs_autotranslation/html
27
28