diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-15 11:55:59 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-15 11:55:59 +0100 |
commit | 22083287912ebd552e33b79f7c567bc966376d43 (patch) | |
tree | a16fa012a97a249e25a405d4092b0a89321bfaf6 /documentation/tools/poky-docbook-to-pdf | |
parent | 13a702e9e572a2dc9f6b52a1531a2237d4d98ff1 (diff) | |
download | poky-22083287912ebd552e33b79f7c567bc966376d43.tar.gz |
handbook: Move into documentation directory
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'documentation/tools/poky-docbook-to-pdf')
-rwxr-xr-x | documentation/tools/poky-docbook-to-pdf | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/documentation/tools/poky-docbook-to-pdf b/documentation/tools/poky-docbook-to-pdf new file mode 100755 index 0000000000..aa221c02bc --- /dev/null +++ b/documentation/tools/poky-docbook-to-pdf | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ -z "$1" -o -z "$2" ]; then | ||
4 | echo "usage: [-v] $0 <docbook file> <templatedir>" | ||
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 | FO=`echo $1 | sed s/.xml/.fo/` || exit 1 | ||
13 | PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1 | ||
14 | TEMPLATEDIR=$2 | ||
15 | |||
16 | ## | ||
17 | # These URI should be rewritten by your distribution's xml catalog to | ||
18 | # match your localy installed XSL stylesheets. | ||
19 | XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current" | ||
20 | |||
21 | xsltproc -o /tmp/titlepage.xsl \ | ||
22 | --xinclude \ | ||
23 | $XSL_BASE_URI/template/titlepage.xsl \ | ||
24 | $TEMPLATEDIR/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 "$TEMPLATEDIR/draft.png" \ | ||
33 | --output $FO \ | ||
34 | $TEMPLATEDIR/poky-db-pdf.xsl \ | ||
35 | $1 || exit 1 | ||
36 | |||
37 | echo fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1 | ||
38 | fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1 | ||
39 | |||
40 | rm -f $FO | ||
41 | rm -f /tmp/titlepage.xsl | ||
42 | |||
43 | echo | ||
44 | echo " #### Success! $PDF ready. ####" | ||
45 | echo | ||