]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2014/06/06.rss
Generated.
[homepage.git] / blog / archive / 2014 / 06 / 06.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from June 2014</title>
5 <description>Entries from June 2014</description>
6 <link>https://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>From English wiki to translated PDF and epub via Docbook</title>
11 <link>https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html</link>
12 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html</guid>
13 <pubDate>Tue, 17 Jun 2014 11:30:00 +0200</pubDate>
14 <description>&lt;p&gt;The &lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Debian Edu / Skolelinux
15 project&lt;/a&gt; provide an instruction manual for teachers, system
16 administrators and other users that contain useful tips for setting up
17 and maintaining a Debian Edu installation. This text is about how the
18 text processing of this manual is handled in the project.&lt;/p&gt;
19
20 &lt;p&gt;One goal of the project is to provide information in the native
21 language of its users, and for this we need to handle translations.
22 But we also want to make sure each language contain the same
23 information, so for this we need a good way to keep the translations
24 in sync. And we want it to be easy for our users to improve the
25 documentation, avoiding the need to learn special formats or tools to
26 contribute, and the obvious way to do this is to make it possible to
27 edit the documentation using a web browser. We also want it to be
28 easy for translators to keep the translation up to date, and give them
29 help in figuring out what need to be translated. Here is the list of
30 tools and the process we have found trying to reach all these
31 goals.&lt;/p&gt;
32
33 &lt;p&gt;We maintain the authoritative source of our manual in the
34 &lt;a href=&quot;https://wiki.debian.org/DebianEdu/Documentation/Wheezy/&quot;&gt;Debian
35 wiki&lt;/a&gt;, as several wiki pages written in English. It consist of one
36 front page with references to the different chapters, several pages
37 for each chapter, and finally one &quot;collection page&quot; gluing all the
38 chapters together into one large web page (aka
39 &lt;a href=&quot;https://wiki.debian.org/DebianEdu/Documentation/Wheezy/AllInOne&quot;&gt;the
40 AllInOne page&lt;/a&gt;). The AllInOne page is the one used for further
41 processing and translations. Thanks to the fact that the
42 &lt;a href=&quot;http://moinmo.in/&quot;&gt;MoinMoin&lt;/a&gt; installation on
43 wiki.debian.org support exporting pages in
44 &lt;a href=&quot;http://www.docbook.org/&quot;&gt;the Docbook format&lt;/a&gt;, we can fetch
45 the list of pages to export using the raw version of the AllInOne
46 page, loop over each of them to generate a Docbook XML version of the
47 manual. This process also download images and transform image
48 references to use the locally downloaded images. The generated
49 Docbook XML files are slightly broken, so some post-processing is done
50 using the &lt;tt&gt;documentation/scripts/get_manual&lt;/tt&gt; program, and the
51 result is a nice Docbook XML file (debian-edu-wheezy-manual.xml) and
52 a handfull of images. The XML file can now be used to generate PDF, HTML
53 and epub versions of the English manual. This is the basic step of
54 our process, making PDF (using dblatex), HTML (using xsltproc) and
55 epub (using dbtoepub) version from Docbook XML, and the resulting files
56 are placed in the debian-edu-doc-en binary package.&lt;/p&gt;
57
58 &lt;p&gt;But English documentation is not enough for us. We want translated
59 documentation too, and we want to make it easy for translators to
60 track the English original. For this we use the
61 &lt;a href=&quot;http://packages.qa.debian.org/p/poxml.html&quot;&gt;poxml&lt;/a&gt; package,
62 which allow us to transform the English Docbook XML file into a
63 translation file (a .pot file), usable with the normal gettext based
64 translation tools used by those translating free software. The pot
65 file is used to create and maintain translation files (several .po
66 files), which the translations update with the native language
67 translations of all titles, paragraphs and blocks of text in the
68 original. The next step is combining the original English Docbook XML
69 and the translation file (say debian-edu-wheezy-manual.nb.po), to
70 create a translated Docbook XML file (in this case
71 debian-edu-wheezy-manual.nb.xml). This translated (or partly
72 translated, if the translation is not complete) Docbook XML file can
73 then be used like the original to create a PDF, HTML and epub version
74 of the documentation.&lt;/p&gt;
75
76 &lt;p&gt;The translators use different tools to edit the .po files. We
77 recommend using
78 &lt;a href=&quot;http://www.kde.org/applications/development/lokalize/&quot;&gt;lokalize&lt;/a&gt;,
79 while some use emacs and vi, others can use web based editors like
80 &lt;a href=&quot;http://pootle.translatehouse.org/&quot;&gt;Poodle&lt;/a&gt; or
81 &lt;a href=&quot;https://www.transifex.com/&quot;&gt;Transifex&lt;/a&gt;. All we care about
82 is where the .po file end up, in our git repository. Updated
83 translations can either be committed directly to git, or submitted as
84 &lt;a href=&quot;https://bugs.debian.org/src:debian-edu-doc&quot;&gt;bug reports
85 against the debian-edu-doc package&lt;/a&gt;.&lt;/p&gt;
86
87 &lt;p&gt;One challenge is images, which both might need to be translated (if
88 they show translated user applications), and are needed in different
89 formats when creating PDF and HTML versions (epub is a HTML version in
90 this regard). For this we transform the original PNG images to the
91 needed density and format during build, and have a way to provide
92 translated images by storing translated versions in
93 images/$LANGUAGECODE/. I am a bit unsure about the details here. The
94 package maintainers know more.&lt;/p&gt;
95
96 &lt;p&gt;If you wonder what the result look like, we provide
97 &lt;a href=&quot;http://maintainer.skolelinux.org/debian-edu-doc/&quot;&gt;the content
98 of the documentation packages on the web&lt;/a&gt;. See for example the
99 &lt;a href=&quot;http://maintainer.skolelinux.org/debian-edu-doc/it/debian-edu-wheezy-manual.pdf&quot;&gt;Italian
100 PDF version&lt;/a&gt; or the
101 &lt;a href=&quot;http://maintainer.skolelinux.org/debian-edu-doc/de/debian-edu-wheezy-manual.html&quot;&gt;German
102 HTML version&lt;/a&gt;. We do not yet build the epub version by default,
103 but perhaps it will be done in the future.&lt;/p&gt;
104
105 &lt;p&gt;To learn more, check out
106 &lt;a href=&quot;http://packages.qa.debian.org/d/debian-edu-doc.html&quot;&gt;the
107 debian-edu-doc package&lt;/a&gt;,
108 &lt;a href=&quot;https://wiki.debian.org/DebianEdu/Documentation/Wheezy/&quot;&gt;the
109 manual on the wiki&lt;/a&gt; and
110 &lt;a href=&quot;https://wiki.debian.org/DebianEdu/Documentation/Wheezy/Translations&quot;&gt;the
111 translation instructions&lt;/a&gt; in the manual.&lt;/p&gt;
112 </description>
113 </item>
114
115 <item>
116 <title>Hvordan enkelt laste ned filmer fra NRK med den &quot;nye&quot; løsningen</title>
117 <link>https://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html</link>
118 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html</guid>
119 <pubDate>Mon, 16 Jun 2014 19:20:00 +0200</pubDate>
120 <description>&lt;p&gt;Jeg har fortsatt behov for å kunne laste ned innslag fra NRKs
121 nettsted av og til for å se senere når jeg ikke er på nett, men
122 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK.html&quot;&gt;min
123 oppskrift fra 2011&lt;/a&gt; sluttet å fungere da NRK byttet
124 avspillermetode. I dag fikk jeg endelig lett etter oppdatert løsning,
125 og jeg er veldig glad for å fortelle at den enkleste måten å laste ned
126 innslag er å bruke siste versjon 2014.06.07 av
127 &lt;a href=&quot;http://rg3.github.io/youtube-dl/&quot;&gt;youtube-dl&lt;/a&gt;. Støtten i
128 youtube-dl &lt;a href=&quot;https://github.com/rg3/youtube-dl/issues/2980&quot;&gt;kom
129 inn for 23 dager siden&lt;/a&gt; og
130 &lt;a href=&quot;http://packages.qa.debian.org/y/youtube-dl.html&quot;&gt;versjonen i
131 Debian&lt;/a&gt; fungerer fint også som backport til Debian Wheezy. Det er
132 et lite problem, det håndterer kun URLer med små bokstaver, men hvis
133 en har en URL med store bokstaver kan en bare gjøre alle store om til
134 små bokstaver for å få youtube-dl til å laste ned. Rapporterte
135 nettopp
136 &lt;a href=&quot;https://github.com/rg3/youtube-dl/issues/2980&quot;&gt;problemet til
137 utviklerne&lt;/a&gt;, og antar de får fikset det snart.&lt;/p&gt;
138
139 &lt;p&gt;Dermed er alt klart til å laste ned dokumentarene om
140 &lt;a href=&quot;http://tv.nrk.no/program/KOID23005014/usas-hemmelige-avlytting&quot;&gt;USAs
141 hemmelige avlytting&lt;/a&gt; og
142 &lt;a href=&quot;http://tv.nrk.no/program/KOID23005114/selskapene-bak-usas-avlytting&quot;&gt;Selskapene
143 bak USAs avlytting&lt;/a&gt;, i tillegg til
144 &lt;a href=&quot;http://tv.nrk.no/program/KOID20005814/et-moete-med-edward-snowden&quot;&gt;intervjuet
145 med Edward Snowden gjort av den tyske tv-kanalen ARD&lt;/a&gt;. Anbefaler
146 alle å se disse, sammen med
147 &lt;a href=&quot;http://media.ccc.de/browse/congress/2013/30C3_-_5713_-_en_-_saal_2_-_201312301130_-_to_protect_and_infect_part_2_-_jacob.html&quot;&gt;foredraget
148 til Jacob Appelbaum på siste CCC-konferanse&lt;/a&gt;, for å forstå mer om
149 hvordan overvåkningen av borgerne brer om seg.&lt;/p&gt;
150
151 &lt;p&gt;Takk til gode venner på foreningen NUUGs IRC-kanal
152 &lt;a href=&quot;irc://irc.freenode.net/%23nuug&quot;&gt;#nuug på irc.freenode.net&lt;/a&gt;
153 for tipsene som fikk meg i mål&lt;/a&gt;.&lt;/p&gt;
154
155 &lt;p&gt;&lt;strong&gt;Oppdatering 2014-06-17&lt;/strong&gt;: Etter at jeg publiserte
156 denne, ble jeg tipset om bloggposten
157 &quot;&lt;a href=&quot;http://ingvar.blog.redpill-linpro.com/2012/05/31/downloading-hd-content-from-tv-nrk-no/&quot;&gt;Downloading
158 HD content from tv.nrk.no&lt;/a&gt;&quot; av Ingvar Hagelund, som har alternativ
159 implementasjon og tips for å lage mkv-fil med undertekstene inkludert.
160 Kanskje den passer bedre for deg? I tillegg ble feilen i youtube-dl
161 ble fikset litt senere ut på dagen i går, samt at youtube-dl fikk
162 støtte for å laste ned undertitler. Takk til Anders Einar Hilden for
163 god innsats og youtube-dl-utviklerne for rask respons.&lt;/p&gt;
164 </description>
165 </item>
166
167 </channel>
168 </rss>