[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [16NG] [ietfdb] #324: Move old liaison statements from hardcoded template to database
#324: Move old liaison statements from hardcoded template to database
-----------------------------------+----------------------------------------
Reporter: pasi.eronen at … | Owner:
Type: enhancement | Status: new
Priority: medium | Milestone:
Component: liaison/ | Version:
Keywords: |
-----------------------------------+----------------------------------------
Comment(by pasi.eronen at …):
Some Perl code that isn't finished, but could be useful:
{{{
open(INPUT, "liaisondetail_list.html");
$/ = '<tr>';
while ($_ = <INPUT>) {
last if (/Legacy stuff, hardcoded/);
}
while ($_ = <INPUT>) {
s/ valign=top>/>/g;
s/ valign="top">/>/g;
s/ nowrap>/>/g;
s/<td>/<td>/gi;
s/<\/td>//gi;
s/<\/tr>//gi;
s/<tr>//gi;
s/<br>//gi;
s/\s+/ /g;
s/<.table> .. endblock ..//;
s/^\s*<td>//;
s/\s*<td>/\t/g;
@cols = split /\t/;
if (@cols != 4) {
die "Not four columns";
}
$date = $cols[0];
if ($date !~ /^\w+ \d\d\d\d$/) {
print $_;
die "Bad date $date";
}
$links = $cols[3];
$links =~ s/\(\.?pdf file\)//g;
$links =~ s/\(pdf\)//g;
$links =~ s/<\/a>( \(Temporary Document [^)]+\))/\1<\/a>/g;
if ($links !~ /^(\s*<a href="[^"]+">[^<]*<\/a>)+\s*$/i) {
print "------\n", $links, "\n";
}
}
}}}
--
Ticket URL: <http://trac.tools.ietf.org/tools/ietfdb/ticket/324#comment:1>
ietfdb <http://tools.ietf.org/tools/ietfdb/>