[debian-edu-commits] debian-edu/debian-edu-doc.git (#271) - wheezy (branch) updated: 0.7.20071108-26-g1a9a709

David Prévot taffit at alioth.debian.org
Sat Oct 5 12:15:18 UTC 2013


The branch, wheezy has been updated
       via  1a9a709232b697f80c8aba1f2b842eab667dcffc (commit)
      from  f5ced5180d4c0887fe1c3769e365d56f17ef12f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                |    6 +-
 documentation/release-manual/get_release-manual |   82 ++++++++++++++++++-----
 todo                                            |    1 -
 3 files changed, 70 insertions(+), 19 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 131d31d..50ea1c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,9 +11,11 @@ debian-edu-doc (0.8.20071114) unstable; urgency=low
   * release-manual/images/: prepare images per language
   * release-manual/Makefile: install localized images if they exist, otherwise
     link to the english images
-  * release-manual/README: improve the notes for translators 
+  * release-manual/README: improve the notes for translators
+  * release-manual/get-release-manual: rewritten, now fetches chapter by
+    chapter and adds id paramters to the section tags, so that links work
 
- -- Holger Levsen <holger at debian.org>  Wed, 14 Nov 2007 14:41:09 +0100
+ -- Holger Levsen <holger at debian.org>  Wed, 14 Nov 2007 22:05:46 +0100
 
 debian-edu-doc (0.7.20071108) unstable; urgency=low
 
diff --git a/documentation/release-manual/get_release-manual b/documentation/release-manual/get_release-manual
index 375e04f..73e7ac0 100755
--- a/documentation/release-manual/get_release-manual
+++ b/documentation/release-manual/get_release-manual
@@ -1,35 +1,85 @@
 #!/bin/sh
 #
 # download the AllInOne page of the release-manual as docbook
+# and transform it into release-manual.xml
 #
-# loosly based on the moinmoin2pdf script from Petter Reinholdtsen
+# very loosly based on the moinmoin2pdf script from Petter Reinholdtsen
 #
-# Author: Holger Levsen
-# Date:   2006-07-06
+# Author/Copyright:	Holger Levsen
+# Licence:		GPL2+
+# first edited:		2006-07-06
+# last edited:		2007-11-14
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
 
-url="http://wiki.skolelinux.no/DebianEdu/Documentation/Etch/AllInOne"
+url="http://wiki.skolelinux.no/DebianEdu/Documentation/Etch/"
 name="release-manual.xml"
 
 DEBIAN_EDU_DOC_BUILDDATE=`date -u +%Y-%m-%d\ %H:%M\ %Z`
+DEBIAN_EDU_DOC_TITLE="Debian Edu / Skolelinux Terra 3.0 Release Manual"
 
+# the last but one sed "preserves" the 2nd matched regex
+# the last sed does the same as dos2unix
+GET "${url}AllInOne?action=raw"|sed "s%\[\[Include(%%g" | sed "s%)]]%%g" | sed "s%DebianEdu/Documentation/Etch%%g"|sed 's/.$//'> id
 
-# download the docbook version of the release manual from the wiki and pipe it through sed to
-#   - insert the build date
-#   - convert <code> tag to <computeroutput> as this is understood by docbook (tools)
-GET "$url?action=format&mimetype=xml/docbook" | 
-	sed "s%<para/>%%g" | 
+for i in `cat id` ; do
+	TARGET=`echo "${i}" |sed "s/\(.*\)\/\(.*\)/\2/" `.xml
+	echo "$TARGET		${url}${i}?action=format&mimetype=xml/docbook"
+	# download the docbook version of the release manual from the wiki and pipe it through sed to
+	#   - insert the build date
+	#   - convert <code> tag to <computeroutput> as this is understood by docbook (tools)
+	#   - the last sed command deletes the first 4 lines
+	GET "${url}${i}?action=format&mimetype=xml/docbook" | 
+	sed  "s%<para/>%%g"  |
 	sed "s%<\/%\n<\/%g" |
-	sed "s%<title>%\n<title>%g" | 
-	sed "s%<section>%\n\n<section>%g" | 
-	sed "s%<para>%\n<para>%g" | 
+	sed "s%<title>%\n<title>%g" |
+	sed "s%<section>%\n\n<section>%g" |
+	sed "s%<para>%\n<para>%g" |
 	sed "s/\$DEBIAN_EDU_DOC_BUILDDATE/<code>$DEBIAN_EDU_DOC_BUILDDATE<\/code>/" |
 	sed "s%code>%computeroutput>%g" |
-	sed "s%/wiki/rightsidebar/img/%./images/%g" | 
-	sed 's%<?xml version="1.0"?>%<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">%' > $name
+	sed "s%/wiki/rightsidebar/img/%./images/%g" |
+	sed "s%</article>%%" |
+	sed '1,4d' > $TARGET
+done
+
+# now only keep the page name (equals section id) without path
+# (replace with the second match of the regular expression)
+sed -i "s/\(.*\)\/\(.*\)/\2/" id
+
+# add id= to <section>s
+for i in `cat id` ; do
+	sed -i "0,/<section>/ s/<section>/<section id=\"$i\">/" ${i}.xml 
+done
+
+# paste it together
+rm -f $name
+for i in `cat id` ; do
+	cat ${i}.xml >> $name
+	rm ${i}.xml
+done
+rm id
 
-# get images and modify .xml file(s)
+# get images and modify $name
 ./get_images
 
+# turn links into internal references if appropriate
+# this needs to run after ./get_images
+#
+#  -0\777  read multiple lines
+perl -0\777 -pi -e  "s/<ulink url='\/DebianEdu\/Documentation\/(.*)\/(.*)'>(.*)\n<\/ulink>/<link linkend=\"\2\">\3<\/link>/g" $name
+
+# make it a docbook article again
+sed -i "1,/</ s#<#<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook XML V4.4//EN\" \"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd\"><article><articleinfo><title>$DEBIAN_EDU_DOC_TITLE</title></articleinfo>\n<#" $name
+sed -i "$ s#>#>\n</article>#" $name
+
 # motivate
-echo `GET "$url?action=format&mimetype=text"|grep -i FIXME |wc -l` FIXMEs left to fix
+echo `GET "${url}AllInOne?action=format&mimetype=text"|grep -i FIXME |wc -l` FIXMEs left to fix
 
diff --git a/todo b/todo
index 0ad4b34..b1216e7 100644
--- a/todo
+++ b/todo
@@ -11,7 +11,6 @@ This should be fixed for r1:
         - images on the wiki do not make it to the PDF and HTML version.
 
 - release-manual
-	- links in html version are broken
 	- localize images for the pdf version too
 	- should we assign the copyright of the document and its translation to the skolelinux
 	  foundation or whatever legal body we have, or to SPI or to the FSF?


hooks/post-receive
-- 
debian-edu-doc.git (Debian package debian-edu-doc)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "debian-edu-doc.git" (Debian package debian-edu-doc).




More information about the debian-edu-commits mailing list