X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fremovals.pl;h=d4392a4e92aa678b300607cc39917daa6f04ba22;hb=80108bebf0307acfc27d586e6faffe193199b14b;hp=3f6deef256eeefbf3a59ea6c779f1645fecc76f9;hpb=92a2117d1545ed818f72626886e61cb3511b7ca5;p=dak.git diff --git a/tools/removals.pl b/tools/removals.pl index 3f6deef2..d4392a4e 100755 --- a/tools/removals.pl +++ b/tools/removals.pl @@ -2,6 +2,7 @@ # removals - generate an RSS feed of removals from Debian # (C) Copyright 2005 Tollef Fog Heen +# (C) Copyright 2010 Uli Martens # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -77,7 +78,7 @@ $rss->channel( my $num_to_display = $config->{items}; for my $removal (@removals ) { - my ($null, $date, $ftpmaster, $body, $reason); + my ($null, $date, $ftpmaster, $body, $packages, $reason); $removal =~ s/=========================================================================//g; $removal =~ m/\[Date: ([^]]+)\] \[ftpmaster: ([^]]+)\]/; $date = $1; @@ -86,10 +87,18 @@ for my $removal (@removals ) { chomp $body; $body =~ m/---- Reason ---.*\n(.*)/; $reason = $1; + $packages = join( ", ", + map { ( my $p = $_ ) =~ s/^\s*(.+?) \|.+/$1/; $p } + grep {/.+\|.+\|.+/} split( /\n/, $body ) ); + $packages + = ( substr $packages, 0, + ( $config->{titlelength} - length($reason) - 6 ) ) + . " ..." + if length("$packages: $reason") > $config->{titlelength}; my $link = encode_base64($date . $ftpmaster); chomp($link); - $rss->add_item(title => "$reason", + $rss->add_item(title => "$packages: $reason", link => $config->{link} . "?" . $link, description => qq[
$body
], dc => {