Paste #pgTMDd937sYjZhUaeO5K

=== modified file 'Makefile'
Makefile [2015-07-22 22:00:36 +0000]
Makefile [2015-07-25 05:23:44 +0000]
1 1 # Makefile for the Xubuntu Documentation
2 2 # Xubuntu Project <xubuntu-devel@lists.ubuntu.com>
3 3
4 VPATH = desktop-guide
5
4 6 # Include revision number
5 7 ifneq ($(REVNO),)
6 8 VERSION =
10 12 # All available translations
11 13 TRANSALL = $(shell basename -s .po -a desktop-guide/po/*.po)
12 14
13 all: clean startpage html translate
15 all: clean startpage html html-translations pdf pdf-translations
14 16
15 17 startpage: get-translations
16 18 mkdir -p build
58 60 translate: get-translations
59 61 $(MAKE) -C desktop-guide translate
60 62
61 translate-pdf: get-translations
62 $(MAKE) -C desktop-guide translate-pdf
63 html-translations: translate
64 $(MAKE) -C desktop-guide html-translations
65
66 pdf-translations: translate
67 $(MAKE) -C desktop-guide pdf-translations
63 68
64 69 test: get-translations
65 70 $(MAKE) -C desktop-guide test
desktop-guide/Makefile [2015-07-22 22:00:36 +0000]
desktop-guide/Makefile [2015-07-25 05:23:44 +0000]
8 8 # All available translations
9 9 TRANSALL = $(shell basename -s .po -a po/*.po)
10 10
11 all: clean html translate
11 all: clean html html-translations pdf pdf-translations
12 12
13 13 html: style
14 14 printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml
15 15 xsltproc --xinclude -o ../build/C/index.html $(XUBUNTUXSL_HTML) C/index.xml
16 16 sed -i 's@\(<p>The contributors to\) this translation of the \(documentation are:</p>\)@\1 the various translations of this \2@' ../build/C/credits-license.html
17 17
18 epub: epubstyle
18 epub: style-epub
19 19 printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml
20 20 xsltproc --xinclude -o ../build/C/ /usr/share/xml/docbook/stylesheet/nwalsh/epub3/chunk.xsl C/index.xml
21 21 sed -i 's@\(<p>The contributors to\) this translation of the \(documentation are:</p>\)@\1 the various translations of this \2@' ../build/C/credits-license.html
25 25
26 26 pdf:
27 27 printf "<itemizedlist>\n\t<listitem><para>Attributed on each translation's page.</para></listitem>\n</itemizedlist>\n" > C/translators.xml
28 xsltproc --stringparam paper.type "A4" --xinclude -o fo/C-A4.fo $(XUBUNTUXSL_PDF) C/index.xml
28 xsltproc --stringparam paper.type A4 --xinclude -o fo/C-A4.fo $(XUBUNTUXSL_PDF) C/index.xml
29 29 sed -i 's@\(>The contributors to\) this translation of the \(documentation are:</\)@\1 the various translations of this \2@' fo/C-A4.fo
30 mkdir -p ../build/C
31 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/C-A4.fo -pdf ../build/C/xubuntu-documentation-A4.pdf
32 sed 's@\(page-width\)="[^"]*" \(page-height\)="[^"]*"@\1="8.5in" \2="11in"@g' fo/C-A4.fo > fo/C-USletter.fo
33 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/C-USletter.fo -pdf ../build/C/xubuntu-documentation-USletter.pdf
30 ../scripts/pdf-create.sh C
34 31
35 32 style:
36 33 mkdir -p ../build/libs
39 36 libs/admon \
40 37 libs/navig \
41 38 ../build/libs/
39 @touch style
42 40
43 epubstyle:
41 style-epub:
44 42 mkdir -p ../build/C/libs/images
45 43 cp libs/images/preferences-desktop.png \
46 44 libs/images/system-lock-screen.png \
51 49 libs/images/key_icon.png \
52 50 ../build/C/libs/images/
53 51
54 translate: get-translations
52 translate: | get-translations
55 53 ../scripts/translate.sh $(TRANSOPTS)
56 54 ../scripts/translators.sh $(TRANSOPTS)
55 @touch translate
56
57 html-translations: style translate
57 58 for dir in $(TRANSLATIONS); do \
58 59 xsltproc --xinclude -o ../build/$$dir/index.html $(XUBUNTUXSL_HTML) $$dir/index.xml; \
59 60 done
60 61
61 translate-pdf: get-translations
62 ../scripts/translate.sh $(TRANSOPTS)
63 ../scripts/translators.sh $(TRANSOPTS)
62 pdf-translations: translate
64 63 for dir in $(TRANSLATIONS); do \
65 xsltproc --stringparam paper.type "A4" --xinclude -o fo/$$dir-A4.fo $(XUBUNTUXSL_PDF) $$dir/index.xml; \
66 mkdir -p ../build/$$dir; \
67 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$$dir-A4.fo -pdf ../build/$$dir/xubuntu-documentation-A4.pdf; \
68 sed 's@\(page-width\)="[^"]*" \(page-height\)="[^"]*"@\1="8.5in" \2="11in"@g' fo/$$dir-A4.fo > fo/$$dir-USletter.fo; \
69 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$$dir-USletter.fo -pdf ../build/$$dir/xubuntu-documentation-USletter.pdf; \
64 xsltproc --stringparam paper.type A4 --xinclude -o fo/$$dir-A4.fo $(XUBUNTUXSL_PDF) $$dir/index.xml; \
70 65 done
66 ../scripts/pdf-create.sh $(TRANSLATIONS)
71 67
72 68 test: get-translations
73 69 set -e; \
98 94 endif
99 95
100 96 clean:
101 rm -rf $(TRANSALL) C/translators.xml fo/
97 rm -rf $(TRANSALL) C/translators.xml fo/ style translate
desktop-guide/libs/style.css [2015-01-19 14:36:56 +0000]
desktop-guide/libs/style.css [2015-07-25 05:50:04 +0000]
181 181 ul li { list-style-type: disc; }
182 182 li p { margin-bottom: 0.1em; }
183 183
184 ul.inline li {
185 list-style-type: none;
186 display: inline;
187 margin-right: 0.5em;
188 }
189
184 190 /*
185 191 * Specific element styles
186 192 *
187 193 */
188 194
195 .pdf-links {
196 margin-bottom: 1em;
197 }
198
199 .pdf-links .title {
200 font-weight: bold;
201 color: #555;
202 }
203
204 .pdf-links ul.inline {
205 display: inline;
206 margin-left: 0.5em;
207 }
208
189 209 p.copyright {
190 210 margin-bottom: 0.3em;
191 211 }
scripts/pdf-create.sh [1970-01-01 00:00:00 +0000]
scripts/pdf-create.sh [2015-07-24 22:56:04 +0000]
1 #!/bin/sh
2
3 for lang in $@; do
4 mkdir -p ../build/$lang
5 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$lang-A4.fo -pdf ../build/$lang/xubuntu-documentation-A4.pdf
6 sed 's@\(page-width\)="[^"]*" \(page-height\)="[^"]*"@\1="8.5in" \2="11in"@g' fo/$lang-A4.fo > fo/$lang-USletter.fo
7 fop -c libs/xubuntu-docbook-pdf-fonts.xml fo/$lang-USletter.fo -pdf ../build/$lang/xubuntu-documentation-USletter.pdf
8 if [ -f ../build/$lang/index.html ]; then
9 sed -i '/<div .*id="masthead"/,/<div class=/ {/<div class=/ a\
10 <div class="pdf-links">\
11 <span class="title">PDF:</span>\
12 <ul class="inline">\
13 <li><a href="xubuntu-documentation-A4.pdf">A4</a></li>\
14 <li><a href="xubuntu-documentation-USletter.pdf">US Letter</a></li>\
15 </ul>\
16 </div>
17 }' ../build/$lang/*.html
18 fi
19 done