#!/usr/bin/perl -s %month = ( 'January' => '01', 'February' => '02', 'March' => '03', 'April' => '04', 'May' => '05', 'June' => '06', 'July' => '07', 'August' => '08', 'September' => '09', 'October' => '10', 'November' => '11', 'December' => '12', ); open (INDEX, ">index.html"); print INDEX < Internet Drafts that Adam Has Edited
EOT ; foreach $file (<*.xml>,) { $file =~ s/old\///; $txt = $file; $txt =~ s/...$/txt/; $html = $file; $html =~ s/...$/html/; $nits = $file; $nits =~ s/....$/-nits.txt/; if ($file =~ /css$/) { open (FILE, "old/$html"); } else { open (FILE, $file); } $body = join('',); close (FILE); ($title) = ($body =~ /]*>([^<]*)/i); ($month, $year) = split(' ',$date); } else { ($month) = ($body =~ /month="([^"]*)"/); ($year) = ($body =~ /year="([^"]*)"/); $date = "$month $year"; } $file =~ s/\....$//; $key = "$year.".$month{$month}.".$file"; $row{$key} .= " \n"; $row{$key} .= " \n"; $row{$key} .= " \n"; $row{$key} .= " \n"; $row{$key} .= " \n"; $row{$key} .= " \n"; } foreach $key (sort {$b cmp $a} keys %row) { unless ($q) { print "$key\n"; } print INDEX "$row{$key}"; } print INDEX "
DateFileTitleDownload
$date$file$title\n"; $row{$key} .= " txt\n"; $row{$key} .= " html\n"; if (-e $nits) { $row{$key} .= " nits\n"; } $row{$key} .= "
\n";