#!/usr/bin/perl
use strict;
# Color coding
# Note statuses will get lowercased before lookup
my %statusStyle = (
'accepted' => 'a',
'retracted' => 'a',
'rejected' => 'r',
'objection' => 'fo',
'deferred' => 'd',
'invalid' => 'oi',
'outofscope' => 'oi',
);
# Header template is at the end of the file
################################################################################
my $inFile = $ARGV[0];
if (!$inFile) {
print "\nPass in issues list filename for processing!";
print "\nOr use argument 'help' for help.\n\n";
print "~~~~~~~~~~~~~~~~~~~~~ Template for issues-list.txt ~~~~~~~~~~~~~~~~~~~~~\n";
print < The following color coding convention is used for comments: Open issues are marked like this An issue can be closed as " . $_ . "
\n";
next;
}
# Don't pipe code
s/</g;
# Linkify URLs
s/(http\S+)/\1<\/a>/g;
# Add thread links
s/>(http[s]?:\/\/lists.w3.org\/Archives\/Public\/)(\S+)<\/a>/>\1\2<\/a> ∈<\/abbr><\/a>/g;
# Add mid links
s/>(http[s]?:\/\/www.w3.org\/mid\/)(\S+)<\/a>/>\1\2<\/a> ⎆<\/abbr><\/a>/g;
# Anchor issue number
s/Issue (\w+)\./Issue \1. #<\/a>/;
my $index = $1;
# Color coding WG response
my @lines = split /\n/;
my ($status, $code);
foreach (@lines) {
# Get Status
if (/^Open/) {
$status = 'open';
}
# Colorize WG response
if (/^(?:Closed|Open):\s+(\S+)/) {
$code = $statusStyle{lc $1};
$_ = '' . $_ . '';
}
# Colorize commenter response
elsif (/^Verified:\s+\S+/) {
$code = 'a';
$_ = '' . $_ . '';
}
else {
$_ = '' . $_ . '';
}
}
# And print it
print OUT "\n";
print OUT join "\n", @lines;
print OUT "
\n";
}
&script;
sub header {
# Read header
local $_ = $title Disposition of Comments for $date $status
$intro
Disposition Status Legend and Filters
Accepted
, OutOfScope
,
Invalid
, Rejected
, or Retracted
.
Verified
indicates commentor's acceptance of the response.