summaryrefslogtreecommitdiff
path: root/handbook/poky-doc-tools/poky-docbook-to-pdf.in
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-02-26 11:31:34 +0000
committerRichard Purdie <richard@openedhand.com>2008-02-26 11:31:34 +0000
commit882e9cd2affb773eec8b1d387ab4e3b5cbdc0994 (patch)
treef023b2ce9abf3b894a81986e0a00e23d77b55e66 /handbook/poky-doc-tools/poky-docbook-to-pdf.in
parent7197110f46511492a48cd359b3ddf75b60ea47c8 (diff)
downloadopenembedded-core-882e9cd2affb773eec8b1d387ab4e3b5cbdc0994.tar.gz
openembedded-core-882e9cd2affb773eec8b1d387ab4e3b5cbdc0994.tar.bz2
openembedded-core-882e9cd2affb773eec8b1d387ab4e3b5cbdc0994.zip
Add Poky handbook
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3865 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'handbook/poky-doc-tools/poky-docbook-to-pdf.in')
-rw-r--r--handbook/poky-doc-tools/poky-docbook-to-pdf.in44
1 files changed, 44 insertions, 0 deletions
diff --git a/handbook/poky-doc-tools/poky-docbook-to-pdf.in b/handbook/poky-doc-tools/poky-docbook-to-pdf.in
new file mode 100644
index 0000000000..cc999ab995
--- /dev/null
+++ b/handbook/poky-doc-tools/poky-docbook-to-pdf.in
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "usage: [-v] $0 <docbook file>"
+ echo
+ echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
+ echo " installed for this to work!"
+ echo
+ exit 0
+fi
+
+if [ "$1" = "-v" ]; then
+ echo "Version @version@"
+ exit 1
+fi
+
+BASENAME=`basename $1 .xml` || exit 1
+FO="$BASENAME.fo"
+PDF="$BASENAME.pdf"
+
+xsltproc -o /tmp/titlepage.xsl \
+ --xinclude \
+ /usr/share/xml/docbook/stylesheet/nwalsh/template/titlepage.xsl \
+ @datadir@/common/titlepage.templates.xml || exit 1
+
+xsltproc --xinclude \
+ --stringparam hyphenate false \
+ --stringparam formal.title.placement "figure after" \
+ --stringparam ulink.show 1 \
+ --stringparam body.font.master 9 \
+ --stringparam title.font.master 11 \
+ --stringparam draft.watermark.image "@datadir@/common/draft.png" \
+ --output $FO \
+ @datadir@/common/poky-db-pdf.xsl \
+ $1 || exit 1
+
+fop -c @datadir@/common/fop-config.xml -fo $FO -pdf $PDF || exit 1
+
+rm -f $FO
+rm -f /tmp/titlepage.xsl
+
+echo
+echo " #### Success! $PDF ready. ####"
+echo \ No newline at end of file