rockbox/www/irc/irclogs.pl

37 lines
888 B
Perl
Raw Normal View History

#!/usr/bin/perl
require "/home/dast/perl/date.pm";
opendir(DIR, ".") or
die "Can't opendir()";
@logs = sort grep { /^rockbox-/ } readdir(DIR);
closedir DIR;
print "<table><tr valign=top>\n";
$lasty = 0;
$lastm = 0;
for ( @logs ) {
$size = (stat("$_"))[7];
$file = $_;
$log = "";
if (/-(\d+)/) {
if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) {
$y = $1;
$m = $2;
$d = $3;
$mname = ucfirst MonthNameEng($m);
if ( $m != $lastm ) {
print "</ul></td>\n" if $lastm != 0;
print "<td align=\"right\"><b>$mname $y</b>\n";
print "<ul>\n";
$lastm = $m;
}
print "<li><a test href=\"$file\">$mname $d</a>\n";
}
}
#print "<li><a href=\"daily/$_\">$_</a> ($size bytes) $log\n";
}
print "</ul></td></tr></table>\n";