[debian-edu-commits] debian-edu/debian-edu-doc.git (#146) - wheezy (branch) updated: 0.6.20070721-20-g898d317

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


The branch, wheezy has been updated
       via  898d317297459b47d015769844d5a020db943e84 (commit)
      from  a9d32900f1a143e4c3f49c379baf4ec242b79d84 (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:
 documentation/release-manual/get_images.pl |   50 ++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100755 documentation/release-manual/get_images.pl

The diff of changes is:
diff --git a/documentation/release-manual/get_images.pl b/documentation/release-manual/get_images.pl
new file mode 100755
index 0000000..92c1e8f
--- /dev/null
+++ b/documentation/release-manual/get_images.pl
@@ -0,0 +1,50 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use IO::Dir;
+
+our $base = "http://wiki.skolelinux.no";
+our $imagedir = "./images";
+
+sub create ($) {
+	my $link = shift;
+	my $name = $link;
+	my $url;
+	#FIXME: Evil hack :S
+	$name =~ s#/DebianEdu/Documentation/Etch/\w+\?action=AttachFile&do=get&target=([\w\d]+)#$1#g;
+	if ($name =~ m#http://www\.skolelinux\.no/slschools/worldmap\.php\?lang=en&foo=bar\.jpeg#) {
+		$url = $name;
+		$name = "worldmap.jpeg";
+	} else {
+		$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");
+	}
+	print $name . "\n";
+	return "<imagedata fileref='". $imagedir."/".$name."'/>";
+
+}
+
+sub replace () {
+	open(FILE, '<./release-manual.xml') or die "Can't open file, perhaps not in the correct dir?";
+	undef $/;
+	my $local = <FILE>;
+	close(FILE);
+	if ( $local =~ m#<imagedata fileref='/DebianEdu/Documentation/Etch/\w+\?action=AttachFile&do=get&target=([^']+)'/>#) {
+		$local =~ s#<imagedata fileref='([^'"<>]+)'/>#create($1)#eg;
+		open(FILE, '>./release-manual.xml') or die "Can't open file for writing";
+		print FILE $local;
+		close(FILE);
+	}
+	
+}
+
+&replace();
+
+
+


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