[debian-edu-commits] debian-edu/debian-edu-doc.git (#491) - wheezy (branch) updated: 1.2_20090131-6-g9918d03

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


The branch, wheezy has been updated
       via  9918d038a1845f8fdf48c3ccd278c53bcaec1b50 (commit)
      from  35f7fe53e531d219e50234b7116fe7bbae31291c (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 +-
 debian/mail_stats_to_list                          |    2 +-
 debian/rules                                       |    2 +-
 documentation/release-manual/Makefile              |   10 +-
 documentation/release-manual/get_release-manual    |  116 --------------------
 documentation/release-manual/start_new_translation |   30 -----
 documentation/release-manual/update_translations   |   20 ----
 documentation/rosegarden/Makefile                  |   13 ++-
 documentation/rosegarden/get_images                |   54 ---------
 .../{release-manual => scripts}/get_images         |   20 ++--
 .../get_rosegarden-manual => scripts/get_manual}   |   22 ++--
 .../{rosegarden => scripts}/start_new_translation  |    0
 .../{rosegarden => scripts}/update_translations    |    0
 13 files changed, 49 insertions(+), 246 deletions(-)
 delete mode 100755 documentation/release-manual/get_release-manual
 delete mode 100755 documentation/release-manual/start_new_translation
 delete mode 100755 documentation/release-manual/update_translations
 delete mode 100755 documentation/rosegarden/get_images
 rename documentation/{release-manual => scripts}/get_images (67%)
 rename documentation/{rosegarden/get_rosegarden-manual => scripts/get_manual} (84%)
 rename documentation/{rosegarden => scripts}/start_new_translation (100%)
 rename documentation/{rosegarden => scripts}/update_translations (100%)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 9957366..b711584 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ debian-edu-doc (1.2~20090629~5.0.1+edu0~alpha) UNRELEASED; urgency=low
   * Include the Debian Edu lenny release-manual and not the etch one anymore.
   * Adopt get_$document and get_images to deal with changes due to the
     moinmoin upgrade on wiki.debian.org.
+  * Factorize get_manual and get_images so that they can be shared upon
+    different manuals, the only configuration parts are in the Makefiles.
   * Generate better status about the manuals, to motivate people to write 
     missing documentation bits and to translate.
   * Disable build (and thus shipping) of itil document, as it can only be
@@ -19,9 +21,9 @@ debian-edu-doc (1.2~20090629~5.0.1+edu0~alpha) UNRELEASED; urgency=low
         - include audacity manual and release manual for etch
         - create new packages debian-edu-doc-CC-etch, debian-edu-doc-rosegarden
           and debian-edu-doc-audacity
+        - rename release-manual to debian-edu-lenny manual (and etch
+          obviously)
         - Italian translation is broken
-        - images are missing in pdf version
-        - check if smileys and alerts etc images are there
 
  -- Holger Levsen <holger at debian.org>  Mon, 02 Feb 2009 14:06:48 +0100
 
diff --git a/debian/mail_stats_to_list b/debian/mail_stats_to_list
index 9e3f80e..96a8e2e 100755
--- a/debian/mail_stats_to_list
+++ b/debian/mail_stats_to_list
@@ -42,7 +42,7 @@ for i in release-manual rosegarden ; do
 	echo >> $TMPFILE
 	make update > /dev/null 2>&1 
 	make status >> $TMPFILE 2>&1 
-	grep -v "cat fixme-status.txt" $TMPFILE | mail -s "Content and translation status for $i" debian-edu at lists.debian.org
+	cat $TMPFILE | mail -s "Content and translation status for $i" debian-edu at lists.debian.org
 	rm $TMPFILE
 	cd ..
 done
diff --git a/debian/rules b/debian/rules
index 8a2ba02..6fb5e79 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,7 +31,7 @@ install: build
 	dh_clean -k
 	dh_installdirs
 	#
-	# build ITIL book, release-manual and rosegarden-manual
+	# build manuals
 	#
 	$(MAKE) install DESTDIR="$(DESTDIR)"
 
diff --git a/documentation/release-manual/Makefile b/documentation/release-manual/Makefile
index 354598c..0981757 100644
--- a/documentation/release-manual/Makefile
+++ b/documentation/release-manual/Makefile
@@ -2,6 +2,14 @@ DESTDIR=
 DESTPATH = /usr/share/doc
 LANGUAGES = `find . -name "release-manual.*.po" | sed -e "s/.\/release-manual.//" -e "s/.po//"`
 
+url=http://wiki.debian.org/DebianEdu/Documentation/Lenny/
+name=release-manual.xml
+DEBIAN_EDU_DOC_TITLE="Debian Edu / Skolelinux Lenny 5.0.1+edu0~alpha Release Manual"
+path1=DebianEdu/Documentation/Lenny
+path2='\/DebianEdu\/Documentation\/'
+export 
+
+
 all: build
 
 update:
@@ -13,7 +21,7 @@ status:
 		echo -n "$$f: "; \
 		LANG=C msgfmt --statistics $$f -o /dev/null ; \
 	done
-	cat fixme-status.txt
+	@cat fixme-status.txt
 
 build:
 	# create localized xml files
diff --git a/documentation/release-manual/get_release-manual b/documentation/release-manual/get_release-manual
deleted file mode 100755
index 315f386..0000000
--- a/documentation/release-manual/get_release-manual
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/sh
-#
-# download the AllInOne page of the release-manual as docbook
-# and transform it into release-manual.xml
-#
-# very loosly based on the moinmoin2pdf script from Petter Reinholdtsen
-#
-# Author/Copyright:	Holger Levsen
-# Licence:		GPL2+
-# first edited:		2006-07-06
-# last edited:		2009-05-29
-# 
-# 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.
-
-if [ ! $(which xmllint) ] ; then
-	echo "Please install libxml2-utils."
-	exit 1
-fi
-
-url="http://wiki.debian.org/DebianEdu/Documentation/Lenny/"
-name="release-manual.xml"
-TMPFILE=$(mktemp)
-
-DEBIAN_EDU_DOC_BUILDDATE=`date -u +%Y-%m-%d`
-DEBIAN_EDU_DOC_TITLE="Debian Edu / Skolelinux Lenny 5.0.1+edu0~alpha 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/Lenny%%g"|sed 's/.$//'|head -n -2> id
-
-for i in `cat id` ; do
-	TARGET=`echo "${i}" |sed "s/\(.*\)\/\(.*\)/\2/" `.xml
-	echo "$TARGET		${url}${i}?action=show&mimetype=text/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)
-	#   - provide correct path to the images
-	#   - remove the revision history
-	#   - add some linebreaks
-	#   - the last sed command deletes the first 4 lines
-	GET "${url}${i}?action=show&mimetype=text/docbook" | 
-	sed "s/\$DEBIAN_EDU_DOC_BUILDDATE/<code>$DEBIAN_EDU_DOC_BUILDDATE<\/code>/" |
-	sed "s%code>%computeroutput>%g" |
-	sed "s%/htdocs/rightsidebar/img/%./images/%g" |
-	sed "s%</article>%%" |
-	sed "s#</revhistory>##g" |
-	sed "s%</authorinitials>%%" |
-	sed "s#<revremark>\(.*\)</revremark>##g" | 
-	sed "s#<authorinitials>\(.*\)</authorinitials>##g" | 
-	sed "s#</articleinfo>##g" |
-	sed "s#</revision>##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%</date>\(.*\)\$%%g" |
-	sed "s%FIXME%\nFIXME%g" |
-	sed '1,4d' > $TARGET
-	if [ "$(grep -v FIXMEs $TARGET |grep FIXME)" != "" ] ; then
-		echo "----------------------------------" >> $TMPFILE
-		echo ${url}${i} >> $TMPFILE
-		grep -v FIXMEs $TARGET | grep FIXME >> $TMPFILE
-	fi
-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 $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
-# remove the first two empty lines
-sed -i "1,2d" $name
-# clean it further
-TMPFILE2=$(mktemp)
-xmllint $name > $TMPFILE2
-mv $TMPFILE2 $name
-
-# motivate
-if [ "$(grep -v FIXMEs $name |grep FIXME)" != "" ] ; then
-	echo "===========================" >> $TMPFILE
-	echo `grep -v FIXMEs $name|grep FIXME |wc -l` FIXMEs left to fix >> $TMPFILE
-	echo "===========================" >> $TMPFILE
-fi
-mv $TMPFILE fixme-status.txt
diff --git a/documentation/release-manual/start_new_translation b/documentation/release-manual/start_new_translation
deleted file mode 100755
index f050699..0000000
--- a/documentation/release-manual/start_new_translation
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# this script needs to be run to start a new translation
-#
-# Author: Holger Levsen
-# Date:   2006-07-06
-
-if [ -z "$1" ] ; then
-    echo "Usage: $0 CC"
-    echo
-    echo "where CC=de or CC=en, so it's: '$0 de' for example"
-    exit 1
-fi
-
-if [ -e release-manual.$1.po ] ; then
-	echo
-	echo "Translation already exists, aborting."
-	echo
-	echo "Please translate the remaining strings in release-manual.$1.po." 
-	exit 1
-fi
-
-./get_release-manual
-
-name=release-manual
-
-po4a-gettextize -o tags="<listitem> <emphasis>" -M UTF-8 -f docbook -m $name.xml -p $name.pot
-cp $name.pot $name.$1.po
-
-echo "$name.$1.po generated. Have fun!"
diff --git a/documentation/release-manual/update_translations b/documentation/release-manual/update_translations
deleted file mode 100755
index 40ec4b6..0000000
--- a/documentation/release-manual/update_translations
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# this script needs to be run to update a translation
-#
-# Author: Holger Levsen
-# Date:   2006-07-06
-
-name=release-manual
-
-# Update the pot file
-po4a-gettextize -o tags="<listitem> <emphasis>" -M UTF-8 -f docbook -m $name.xml -p $name.pot
-
-for i in $name.*.po ; do {
-	po4a-updatepo -o tags="<listitem> <emphasis>" -M UTF-8 -f docbook -m $name.xml -p $i
-	echo "$i updated."
-} done
-
-echo "Have fun!"
-
-
diff --git a/documentation/rosegarden/Makefile b/documentation/rosegarden/Makefile
index 196322b..bc0e4ce 100644
--- a/documentation/rosegarden/Makefile
+++ b/documentation/rosegarden/Makefile
@@ -2,18 +2,25 @@ DESTDIR=
 DESTPATH = /usr/share/doc
 LANGUAGES = `find . -name "rosegarden-manual.*.po" | sed -e "s/.\/rosegarden-manual.//" -e "s/.po//"`
 
+url=http://wiki.debian.org/DebianEdu/Documentation/Manuals/Rosegarden/
+name=rosegarden-manual.xml
+DEBIAN_EDU_DOC_TITLE="Debian Edu / Skolelinux Rosegarden manual"
+path1=DebianEdu/Documentation/Manuals/Rosegarden
+path2='\/DebianEdu\/Documentation\/Manuals\/'
+export 
+
 all: build
 
 update:
-	./get_rosegarden-manual
-	./update_translations
+	../scripts/get_manual
+	../scripts/update_translations
 
 status:
 	@for f in *.po ; do \
 		echo -n "$$f: "; \
 		LANG=C msgfmt --statistics $$f -o /dev/null ; \
 	done
-	cat fixme-status.txt
+	@cat fixme-status.txt
 
 build:
 	# create localized xml files
diff --git a/documentation/rosegarden/get_images b/documentation/rosegarden/get_images
deleted file mode 100755
index 9ff1fc2..0000000
--- a/documentation/rosegarden/get_images
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/perl
-# Author: 	Patrick Winnertz <patrick.winnertz at skolelinux.org>
-# License: 	GPLv2 or later
-#
-# This small scripts downloads and stores the images in the images/ subdir, 
-# then it modifies rosegarden-manual.xml to use these images
-
-
-use strict;
-use warnings;
-use IO::Dir;
-
-our $base = "http://wiki.debian.org";
-our $imagedir = "./images";
-
-sub create ($) {
-	my $link = shift;
-	my $name = $link;
-	my $url;
-	# use regex to replace the long url with shorter one
-	$name =~ s#/DebianEdu/Documentation/Manuals/Rosegarden/\w+\?action=AttachFile&do=get&target=([\w\d]+)#$1#g;
-	$url = $base . $link;
-	print "File name: [".$name."]\n";
-	tie my %h_images , 'IO::Dir', $imagedir;
-	if (!(defined($h_images{$name}))) {
-		print "Need to download: [" . $url . "]\n";
-		system("wget \"$url\" -O \"$imagedir/$name\" 2> /dev/null");
-	}
-	return "<imagedata fileref='". $imagedir."/".$name."'/>";
-
-}
-
-sub replace () {
-	open(FILE, '<./rosegarden-manual.xml') or die "Can't open file, perhaps not in the correct dir?";
-	undef $/;
-	my $local = <FILE>;
-	close(FILE);
-	# look for images...
-	if ( $local =~ m#<imagedata fileref='/DebianEdu/Documentation/Manuals/Rosegarden/\w+\?action=AttachFile&do=get&target=([^']+)'/>#) {
-		# ..and replace the paths
-		$local =~ s#<imagedata fileref='([^'"<>]+)'/>#create($1)#eg;
-		open(FILE, '>./rosegarden-manual.xml') or die "Can't open file for writing";
-		print FILE $local;
-		close(FILE);
-	} else {
-		print "File rosegarden-manual.xml has already been modified.\n";
-	}
-	
-}
-
-&replace();
-
-
-
diff --git a/documentation/release-manual/get_images b/documentation/scripts/get_images
similarity index 67%
rename from documentation/release-manual/get_images
rename to documentation/scripts/get_images
index c3c572e..15dfde0 100755
--- a/documentation/release-manual/get_images
+++ b/documentation/scripts/get_images
@@ -3,7 +3,7 @@
 # License: 	GPLv2 or later
 #
 # This small scripts downloads and stores the images in the images/ subdir, 
-# then it modifies release-manual.xml to use these images
+# then it modifies the xml file to use these images
 
 
 use strict;
@@ -12,24 +12,28 @@ use IO::Dir;
 
 our $base = "http://wiki.debian.org";
 our $imagedir = "./images";
+our $file = $ARGV[0];
+our $path = $ARGV[1];
+
 
 sub create ($) {
 	my $link = shift;
 	my $name = $link;
 	my $url;
 	# use regex to replace the long url with shorter one
-	$name =~ s#/DebianEdu/Documentation/Lenny/\w+\?action=AttachFile&do=get&target=([\w\d]+)#$1#g;
+	$name =~ s#$base/$path/\w+\?action=AttachFile&do=get&target=([\w\d]+)#$1#g;
+	print $name."\n";
 	# special case the worldmap image
 	if ($name =~ m#http://www\.skolelinux\.no/slschools/worldmap\.php\?lang=en&image=worldmap\.png#) {
 		$url = $name;
 		$name = "worldmap.png";
 	} else {
-		$url = $base . $link;
+		$url = $link;
 	}
 	print "File name: [".$name."]\n";
 	tie my %h_images , 'IO::Dir', $imagedir;
 	if (!(defined($h_images{$name}))) {
-		print "Need to download: [" . $url . "]\n";
+		print "Need to download: ".$url." to ".$imagedir."/".$name." \n";
 		system("wget \"$url\" -O \"$imagedir/$name\" 2> /dev/null");
 	}
 	return "<imagedata fileref='". $imagedir."/".$name."'/>";
@@ -37,19 +41,19 @@ sub create ($) {
 }
 
 sub replace () {
-	open(FILE, '<./release-manual.xml') or die "Can't open file, perhaps not in the correct dir?";
+	open(FILE, "< $file") or die "Can't open $file perhaps not in the correct dir?";
 	undef $/;
 	my $local = <FILE>;
 	close(FILE);
 	# look for images...
-	if ( $local =~ m#<imagedata fileref='/DebianEdu/Documentation/Lenny/\w+\?action=AttachFile&do=get&target=([^']+)'/>#) {
+	if ( $local =~ "m#<imagedata fileref='/".$path."/\w+\?action=AttachFile&do=get&target=([^']+)'/>#" ) {
 		# ..and replace the paths
 		$local =~ s#<imagedata fileref='([^'"<>]+)'/>#create($1)#eg;
-		open(FILE, '>./release-manual.xml') or die "Can't open file for writing";
+		open(FILE, "> $file") or die "Can't open $file for writing";
 		print FILE $local;
 		close(FILE);
 	} else {
-		print "File release-manual.xml has already been modified.\n";
+		print "File $file has already been modified.\n";
 	}
 	
 }
diff --git a/documentation/rosegarden/get_rosegarden-manual b/documentation/scripts/get_manual
similarity index 84%
rename from documentation/rosegarden/get_rosegarden-manual
rename to documentation/scripts/get_manual
index 7f53731..0aa8c77 100755
--- a/documentation/rosegarden/get_rosegarden-manual
+++ b/documentation/scripts/get_manual
@@ -1,14 +1,14 @@
 #!/bin/sh
 #
-# download the AllInOne page of the rosegarden-manual as docbook
-# and transform it into rosegarden-manual.xml
+# download the AllInOne page of a manual on wiki.debian.org as docbook
+# and transform it into proper XML
 #
 # very loosly based on the moinmoin2pdf script from Petter Reinholdtsen
 #
 # Author/Copyright:	Holger Levsen
 # Licence:		GPL2+
 # first edited:		2006-07-06
-# last edited:		2009-05-29
+# last edited:		2009-05-30
 # 
 # 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
@@ -25,21 +25,23 @@ if [ ! $(which xmllint) ] ; then
 	exit 1
 fi
 
-url="http://wiki.debian.org/DebianEdu/Documentation/Manuals/Rosegarden/"
-name="rosegarden-manual.xml"
+if [ "$name" = "" ] ; then 
+	echo bah
+	exit 1
+fi
 TMPFILE=$(mktemp)
 
 DEBIAN_EDU_DOC_BUILDDATE=`date -u +%Y-%m-%d`
-DEBIAN_EDU_DOC_TITLE="Debian Edu / Skolelinux Rosegarden 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/Manuals/Rosegarden%%g"|sed 's/.$//'> id
+# head at the end chops of the last two lines with the Category:Permalink entry
+GET "${url}AllInOne?action=raw"|sed "s%<<Include(%%g" | sed "s%)>>%%g" | sed "s%$path1%%g" |sed 's/.$//'|head -n -2> id
 
 for i in `cat id` ; do
 	TARGET=`echo "${i}" |sed "s/\(.*\)\/\(.*\)/\2/" `.xml
 	echo "$TARGET		${url}${i}?action=show&mimetype=text/docbook"
-	# download the docbook version of the rosegarden manual from the wiki and pipe it through sed to
+	# download the docbook version of the 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)
 	#   - provide correct path to the images
@@ -89,13 +91,13 @@ done
 rm id
 
 # get images and modify $name
-./get_images
+../scripts/get_images $name $path1
 
 # 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\/Manuals\/(.*)\/(.*)'>(.*)\n<\/ulink>/<link linkend=\"\2\">\3<\/link>/g" $name
+perl -0\777 -pi -e "s/<ulink url='$path2(.*)\/(.*)'>(.*)\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
diff --git a/documentation/rosegarden/start_new_translation b/documentation/scripts/start_new_translation
similarity index 100%
rename from documentation/rosegarden/start_new_translation
rename to documentation/scripts/start_new_translation
diff --git a/documentation/rosegarden/update_translations b/documentation/scripts/update_translations
similarity index 100%
rename from documentation/rosegarden/update_translations
rename to documentation/scripts/update_translations


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