d5a3839b47
Change-Id: I2c7539d889a8186c957b0bc7a695b32429b138bc author: diane fleming
20 lines
564 B
Bash
Executable File
20 lines
564 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Converts the Markdown source into DocBook format suitable for using
|
|
# in the Maven build process.
|
|
#
|
|
# Adapted from:
|
|
# https://wiki.openstack.org/wiki/Documentation/Builds#Markdown_and_DocBook
|
|
|
|
SOURCES=`ls src/markdown/*.md`
|
|
FILENAME=identity-api-v3
|
|
DIRPATH=.
|
|
|
|
XSL=/usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl
|
|
|
|
pandoc -f markdown -t docbook -s $SOURCES | \
|
|
xsltproc -o - $XSL - | \
|
|
xmllint --format -| \
|
|
sed -e "s,<article,<chapter xml:id=\"$FILENAME\"," | \
|
|
sed -e 's,</article>,</chapter>,' > ${DIRPATH}/$FILENAME.xml
|