diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-29 15:26:29 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-29 15:27:04 +0100 |
| commit | 2624b6181411fe722c73ec95aba9ea8c3d92bca5 (patch) | |
| tree | bb3c5db53c6c5fbbdb086c90a644ece12cda8e21 /handbook/tools | |
| parent | 1e0e6f11850c7014700604f7e24f9579d8d19102 (diff) | |
| download | poky-2624b6181411fe722c73ec95aba9ea8c3d92bca5.tar.gz | |
poky-doc-tools: Remove unnecessary autotools usage and simplfy structure
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'handbook/tools')
| -rwxr-xr-x | handbook/tools/poky-docbook-to-pdf | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/handbook/tools/poky-docbook-to-pdf b/handbook/tools/poky-docbook-to-pdf new file mode 100755 index 0000000000..8e3d7542f7 --- /dev/null +++ b/handbook/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 | BASENAME=`basename $1 .xml` || exit 1 | ||
| 13 | FO="$BASENAME.fo" | ||
| 14 | PDF="$BASENAME.pdf" | ||
| 15 | TEMPLATEDIR=$2 | ||
| 16 | |||
| 17 | ## | ||
| 18 | # These URI should be rewritten by your distribution's xml catalog to | ||
| 19 | # match your localy installed XSL stylesheets. | ||
| 20 | XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current" | ||
| 21 | |||
| 22 | xsltproc -o /tmp/titlepage.xsl \ | ||
| 23 | --xinclude \ | ||
| 24 | $XSL_BASE_URI/template/titlepage.xsl \ | ||
| 25 | $TEMPLATEDIR/titlepage.templates.xml || exit 1 | ||
| 26 | |||
| 27 | xsltproc --xinclude \ | ||
| 28 | --stringparam hyphenate false \ | ||
| 29 | --stringparam formal.title.placement "figure after" \ | ||
| 30 | --stringparam ulink.show 1 \ | ||
| 31 | --stringparam body.font.master 9 \ | ||
| 32 | --stringparam title.font.master 11 \ | ||
| 33 | --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \ | ||
| 34 | --output $FO \ | ||
| 35 | $TEMPLATEDIR/poky-db-pdf.xsl \ | ||
| 36 | $1 || exit 1 | ||
| 37 | |||
| 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 | ||
