X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fremovals.pl;h=839fc618c9e060f7fe929825589c1b3a55950af7;hb=425e44739cd77ffa01294f23e94ae7eabd5f5ec8;hp=ec65f15c0519daa21527973f5adbecfdb5f741d5;hpb=be23f99a52455cab4bf791c137463c8fdc4ae5c5;p=dak.git diff --git a/tools/removals.pl b/tools/removals.pl index ec65f15c..839fc618 100755 --- a/tools/removals.pl +++ b/tools/removals.pl @@ -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; @@ -71,11 +71,13 @@ for (0..15) { $rss->add_item(title => "$reason", link => "http://ftp-master.debian.org/removals.txt?" . $link, - description => qq[<pre>$body</pre>], + description => qq[
$body
], dc => { creator => "$ftpmaster", } ); + $num_to_display -= 1; + last unless $num_to_display; } print $rss->as_string;