summaryrefslogtreecommitdiffstats
path: root/documentation/tools
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
committerTudor Florea <tudor.florea@enea.com>2015-10-09 20:59:03 (GMT)
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /documentation/tools
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'documentation/tools')
-rw-r--r--documentation/tools/eclipse-help.sed18
-rw-r--r--documentation/tools/mega-manual.sed31
-rwxr-xr-xdocumentation/tools/poky-docbook-to-pdf51
3 files changed, 100 insertions, 0 deletions
diff --git a/documentation/tools/eclipse-help.sed b/documentation/tools/eclipse-help.sed
new file mode 100644
index 0000000..38690bc
--- /dev/null
+++ b/documentation/tools/eclipse-help.sed
@@ -0,0 +1,18 @@
1# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
2# For example:
3# "ulink" href="http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#faq"
4# -> "link" href="../poky-ref-manual/faq.html"
5s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
6
7# Processes all other manuals (<word>-<word> style)
8# For example:
9# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html#faq"
10# -> "link" href="../kernel-manual/faq.html"
11s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
12
13# Process cases where just an external manual is referenced without an id anchor
14# For example:
15# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html
16# -> "link" href="../kernel-manual/index.html"
17s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
18s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
diff --git a/documentation/tools/mega-manual.sed b/documentation/tools/mega-manual.sed
new file mode 100644
index 0000000..9f3a7ec
--- /dev/null
+++ b/documentation/tools/mega-manual.sed
@@ -0,0 +1,31 @@
1# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style).
2# This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
3# This is the old way that did it. Can't do that now that we have "bitbake-user-manual" strings
4# in the mega-manual.
5# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
6s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
7s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
8
9# Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
10# it is not included in the mega-manual.
11# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
12# This was the one-liner that worked before we introduced the BitBake User Manual, which is
13# not in the mega-manual.
14# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
15
16s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
17s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
18s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
19s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
20s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
21s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
22s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
23
24# Process cases where just an external manual is referenced without an id anchor
25s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
26s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
27s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
28s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
29s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
30s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
31s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.7.2\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
diff --git a/documentation/tools/poky-docbook-to-pdf b/documentation/tools/poky-docbook-to-pdf
new file mode 100755
index 0000000..f55fd27
--- /dev/null
+++ b/documentation/tools/poky-docbook-to-pdf
@@ -0,0 +1,51 @@
1#!/bin/sh
2
3if [ -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
10fi
11
12FO=`echo $1 | sed s/.xml/.fo/` || exit 1
13PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1
14TEMPLATEDIR=$2
15
16##
17# These URI should be rewritten by your distribution's xml catalog to
18# match your localy installed XSL stylesheets.
19XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current"
20
21# Creates a temporary XSL stylesheet based on titlepage.xsl
22xsltproc -o /tmp/titlepage.xsl \
23 --xinclude \
24 $XSL_BASE_URI/template/titlepage.xsl \
25 $TEMPLATEDIR/titlepage.templates.xml || exit 1
26
27# Creates the file needed for FOP
28xsltproc --xinclude \
29 --stringparam hyphenate false \
30 --stringparam formal.title.placement "figure after" \
31 --stringparam ulink.show 1 \
32 --stringparam body.font.master 9 \
33 --stringparam title.font.master 11 \
34 --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \
35 --stringparam chapter.autolabel 1 \
36 --stringparam appendix.autolabel A \
37 --stringparam section.autolabel 1 \
38 --stringparam section.label.includes.component.label 1 \
39 --output $FO \
40 $TEMPLATEDIR/poky-db-pdf.xsl \
41 $1 || exit 1
42
43# Invokes the Java version of FOP. Uses the additional configuration file common/fop-config.xml
44fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1
45
46rm -f $FO
47rm -f /tmp/titlepage.xsl
48
49echo
50echo " #### Success! $PDF ready. ####"
51echo