SUSE documentation is based on docbook or asciidoc. The kiwi documentation is maintained along with the code and uses the sphinx system and therefore ReST as markup language. We would like to keep one source and don't want to move to another markup language. Thus the sources needs to be structured in a way that allows translation into sphinx supported targets as well as into SUSE docbook style. This commit changes the documentation structure in a way that both is possible. With the use of Sphinx XML and rstxml2docbook the ReST docs are converted into docbook. From there the SUSE daps tool can create SUSE documentation
27 lines
758 B
Bash
Executable File
27 lines
758 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z "$oxygen_tool" ];then
|
|
echo "Oxygen schema tool not found"
|
|
echo "Please make sure you have a valid Oxygen license and call:"
|
|
echo
|
|
echo "export oxygen_tool=/path/to/Oxygen/schemaDocumentation.sh"
|
|
echo
|
|
echo "Switching to fallback schema documentation creator"
|
|
echo
|
|
./schema_parser.py ../kiwi/schema/kiwi.rng \
|
|
--output ../doc/source/schema.rst
|
|
else
|
|
cat > ../doc/source/schema.rst <<- EOF
|
|
.. _schema-docs:
|
|
|
|
Schema Documentation 7.1
|
|
========================
|
|
|
|
.. raw:: html
|
|
:file: schema/schema.html
|
|
EOF
|
|
trang -I rnc -O xsd ../kiwi/schema/kiwi.rnc kiwi.xsd && \
|
|
bash $oxygen_tool kiwi.xsd -cfg:schema_docs.conf
|
|
rm -f kiwi.xsd xsi.xsd ../doc/source/schema/xsdDocHtml.css
|
|
fi
|