2002-06-17 15:45:32 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
2003-03-03 23:30:28 +00:00
|
|
|
require "/home/dast/perl/date.pm";
|
2002-06-17 15:45:32 +00:00
|
|
|
|
|
|
|
opendir(DIR, ".") or
|
|
|
|
die "Can't opendir()";
|
|
|
|
@logs = sort grep { /^rockbox-/ } readdir(DIR);
|
|
|
|
closedir DIR;
|
|
|
|
|
2002-08-10 09:18:32 +00:00
|
|
|
print "<table class=archive>\n";
|
2002-06-17 15:45:32 +00:00
|
|
|
|
|
|
|
$lasty = 0;
|
|
|
|
$lastm = 0;
|
2002-09-23 05:19:11 +00:00
|
|
|
$count = 0;
|
2002-06-17 15:45:32 +00:00
|
|
|
|
|
|
|
for ( @logs ) {
|
|
|
|
$size = (stat("$_"))[7];
|
|
|
|
$file = $_;
|
|
|
|
$log = "";
|
2003-03-03 09:26:51 +00:00
|
|
|
|
2002-06-17 15:45:32 +00:00
|
|
|
if (/-(\d+)/) {
|
2003-03-03 09:26:51 +00:00
|
|
|
if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) {
|
2002-06-17 15:45:32 +00:00
|
|
|
$y = $1;
|
|
|
|
$m = $2;
|
|
|
|
$d = $3;
|
2003-03-03 09:26:51 +00:00
|
|
|
|
2003-03-03 09:28:05 +00:00
|
|
|
$mname = ucfirst MonthNameEng($m);
|
2003-03-03 09:26:51 +00:00
|
|
|
if ($y != $lasty) {
|
|
|
|
print "</tr><tr>\n" if $lasty != 0;
|
|
|
|
print "<th>$y</th>\n";
|
|
|
|
$lasty = $y;
|
|
|
|
} else {
|
|
|
|
print "</tr><tr>\n<th></th>" if ( $m != $lastm );
|
|
|
|
}
|
|
|
|
|
2002-06-17 15:45:32 +00:00
|
|
|
if ( $m != $lastm ) {
|
2002-09-23 05:19:11 +00:00
|
|
|
$count=0;
|
2002-08-10 09:18:32 +00:00
|
|
|
print "<th>$mname</th>\n";
|
2002-06-17 15:45:32 +00:00
|
|
|
$lastm = $m;
|
|
|
|
}
|
2003-03-03 09:26:51 +00:00
|
|
|
|
2002-08-10 09:18:32 +00:00
|
|
|
print "<td><a test href=\"$file\">$d</a></td>\n";
|
2003-03-03 09:26:51 +00:00
|
|
|
|
2002-09-23 05:19:11 +00:00
|
|
|
if ( ++$count > 15 ) {
|
2003-03-03 09:26:51 +00:00
|
|
|
print "</tr><tr><th></th><th></th>\n";
|
2002-09-23 05:19:11 +00:00
|
|
|
$count=0;
|
|
|
|
}
|
2002-06-17 15:45:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
print "</ul></td></tr></table>\n";
|