aboutsummaryrefslogtreecommitdiff
path: root/test/pddp/toonepage
diff options
context:
space:
mode:
Diffstat (limited to 'test/pddp/toonepage')
-rwxr-xr-xtest/pddp/toonepage21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/pddp/toonepage b/test/pddp/toonepage
new file mode 100755
index 0000000..f59273a
--- /dev/null
+++ b/test/pddp/toonepage
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+usage () {
+ cat << EOF
+usage: toonepage <pddpsource>.xml
+EOF
+}
+
+[ "$#" == 0 ] && { usage; exit 1; }
+
+SOURCE_NAME="$(basename $1)"
+SOURCE_STUB="$(basename $SOURCE_NAME .xml)"
+
+[ $SOURCE_STUB == $SOURCE_NAME ] && { usage; exit 1; }
+
+xmllint >/dev/null --xinclude --postvalid $1
+xsltproc --nonet --xinclude \
+ --stringparam html.stylesheet pddp.css \
+ -o "$SOURCE_STUB.html" \
+ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl \
+ $1