diff options
author | Richard Purdie <richard@openedhand.com> | 2008-02-26 11:31:34 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-02-26 11:31:34 +0000 |
commit | 882e9cd2affb773eec8b1d387ab4e3b5cbdc0994 (patch) | |
tree | f023b2ce9abf3b894a81986e0a00e23d77b55e66 /handbook/poky-doc-tools/poky-docbook-to-pdf.in | |
parent | 7197110f46511492a48cd359b3ddf75b60ea47c8 (diff) | |
download | poky-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.in | 44 |
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 | |||
3 | if [ -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 | ||
10 | fi | ||
11 | |||
12 | if [ "$1" = "-v" ]; then | ||
13 | echo "Version @version@" | ||
14 | exit 1 | ||
15 | fi | ||
16 | |||
17 | BASENAME=`basename $1 .xml` || exit 1 | ||
18 | FO="$BASENAME.fo" | ||
19 | PDF="$BASENAME.pdf" | ||
20 | |||
21 | xsltproc -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 | |||
26 | xsltproc --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 | |||
37 | fop -c @datadir@/common/fop-config.xml -fo $FO -pdf $PDF || exit 1 | ||
38 | |||
39 | rm -f $FO | ||
40 | rm -f /tmp/titlepage.xsl | ||
41 | |||
42 | echo | ||
43 | echo " #### Success! $PDF ready. ####" | ||
44 | echo \ No newline at end of file | ||