X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=tools%2Fremovals.pl;h=d4392a4e92aa678b300607cc39917daa6f04ba22;hb=a2ceeb816dbaf631c20a3290ee78777a8c909636;hp=0689fffdfdbb324c8716c3d7a5dda76e960b7b37;hpb=c6924c70180cc0a4033fa69f819e5cb4469e85fb;p=dak.git diff --git a/tools/removals.pl b/tools/removals.pl index 0689fffd..d4392a4e 100755 --- a/tools/removals.pl +++ b/tools/removals.pl @@ -78,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; @@ -87,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 => {