X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fremovals.pl;h=062600bd86fb94b52edf2fc94deaf51fe1e6ca08;hb=5b0c25d58e8298cf8eeb4bebaeda723ea563f281;hp=ec65f15c0519daa21527973f5adbecfdb5f741d5;hpb=be23f99a52455cab4bf791c137463c8fdc4ae5c5;p=dak.git diff --git a/tools/removals.pl b/tools/removals.pl index ec65f15c..062600bd 100755 --- a/tools/removals.pl +++ b/tools/removals.pl @@ -26,7 +26,7 @@ use XML::RSS; use POSIX qw(strftime); use CGI qw/:standard/; -open REMOVALS, " '1.0'); $rss->channel( title => "Removals from Debian", - link => "http://ftp-master.debian.org/removals.txt", + link => "http://backports-master.debian.org/removals.txt", description => "List of all the removals from Debian's archives", dc => { date => POSIX::strftime ("%FT%R+00:00",gmtime()), @@ -55,14 +55,14 @@ $rss->channel( } ); -for (0..15) { - my $i = $_; +my $num_to_display = 16; +for my $removal (@removals ) { my ($null, $date, $ftpmaster, $body, $reason); - $removals[$i] =~ s/=========================================================================//g; - $removals[$i] =~ m/\[Date: ([^]]+)\] \[ftpmaster: ([^]]+)\]/; + $removal =~ s/=========================================================================//g; + $removal =~ m/\[Date: ([^]]+)\] \[ftpmaster: ([^]]+)\]/; $date = $1; $ftpmaster = $2; - ($null, $body) = split /\n/, $removals[$i], 2; + ($null, $body) = split /\n/, $removal, 2; chomp $body; $body =~ m/---- Reason ---.*\n(.*)/; $reason = $1; @@ -70,12 +70,14 @@ for (0..15) { chomp($link); $rss->add_item(title => "$reason", - link => "http://ftp-master.debian.org/removals.txt?" . $link, - description => qq[<pre>$body</pre>], + link => "http://backports-master.debian.org/removals.txt?" . $link, + description => qq[
$body
], dc => { creator => "$ftpmaster", } ); + $num_to_display -= 1; + last unless $num_to_display; } print $rss->as_string;