summaryrefslogtreecommitdiffstats
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)
downloadpoky-882e9cd2affb773eec8b1d387ab4e3b5cbdc0994.tar.gz
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 @@
1#!/bin/sh
2
3if [ -z "$1" ]; then
4 echo "usage: [-v] $0 <docbook file>"
5 echo
6 echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
7 echo " installed for this to work!"
8 echo
9 exit 0
10fi
11
12if [ "$1" = "-v" ]; then
13 echo "Version @version@"
14 exit 1
15fi
16
17BASENAME=`basename $1 .xml` || exit 1
18FO="$BASENAME.fo"
19PDF="$BASENAME.pdf"
20
21xsltproc -o /tmp/titlepage.xsl \
22 --xinclude \
23 /usr/share/xml/docbook/stylesheet/nwalsh/template/titlepage.xsl \
24 @datadir@/common/titlepage.templates.xml || exit 1
25
26xsltproc --xinclude \
27 --stringparam hyphenate false \
28 --stringparam formal.title.placement "figure after" \
29 --stringparam ulink.show 1 \
30 --stringparam body.font.master 9 \
31 --stringparam title.font.master 11 \
32 --stringparam draft.watermark.image "@datadir@/common/draft.png" \
33 --output $FO \
34 @datadir@/common/poky-db-pdf.xsl \
35 $1 || exit 1
36
37fop -c @datadir@/common/fop-config.xml -fo $FO -pdf $PDF || exit 1
38
39rm -f $FO
40rm -f /tmp/titlepage.xsl
41
42echo
43echo " #### Success! $PDF ready. ####"
44echo \ No newline at end of file