From 48d170d5d50bb84a96d249f17e2048c48270ea97 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 12 Apr 2010 22:26:38 +0000 Subject: consolidated 'pddp' lib stuff into a single place to make a libdir, ease Debian packaging, and remove the pddpserver svn path=/trunk/externals/pddp/; revision=13424 --- examples/topdf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 examples/topdf (limited to 'examples/topdf') diff --git a/examples/topdf b/examples/topdf new file mode 100755 index 0000000..adf4b43 --- /dev/null +++ b/examples/topdf @@ -0,0 +1,23 @@ +#!/bin/bash + +usage () { + cat << EOF +usage: topdf .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 \ + -o "$SOURCE_STUB.fo" \ + /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl \ + $1 + +# FIXME need to run this twice, it should be check-wrapped too +pdfxmltex "$SOURCE_STUB.fo" -- cgit v1.2.1