summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorRobert Hak <adiamas@rockbox.org>2003-03-03 09:26:51 +0000
committerRobert Hak <adiamas@rockbox.org>2003-03-03 09:26:51 +0000
commit5522cdf13c74ebefa60fa11308ce44921c6b35d9 (patch)
treea919b4aea883058e1c4a8de6647041d6ace33627 /www
parent46736bca314459f54d8a061de03d06b539da4f04 (diff)
downloadrockbox-5522cdf13c74ebefa60fa11308ce44921c6b35d9.tar.gz
rockbox-5522cdf13c74ebefa60fa11308ce44921c6b35d9.zip
correction for irc logs now spanning years
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3368 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'www')
-rwxr-xr-xwww/irc/irclogs.pl28
1 files changed, 17 insertions, 11 deletions
diff --git a/www/irc/irclogs.pl b/www/irc/irclogs.pl
index cf69d2cfb7..729ab1b241 100755
--- a/www/irc/irclogs.pl
+++ b/www/irc/irclogs.pl
@@ -1,6 +1,6 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2 2
3require "/home/dast/perl/date.pm"; 3#require "/home/dast/perl/date.pm";
4 4
5opendir(DIR, ".") or 5opendir(DIR, ".") or
6 die "Can't opendir()"; 6 die "Can't opendir()";
@@ -17,30 +17,36 @@ for ( @logs ) {
17 $size = (stat("$_"))[7]; 17 $size = (stat("$_"))[7];
18 $file = $_; 18 $file = $_;
19 $log = ""; 19 $log = "";
20
20 if (/-(\d+)/) { 21 if (/-(\d+)/) {
21 if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) { 22 if ( $1 =~ /(\d\d\d\d)(\d\d)(\d\d)/ ) {
22 $y = $1; 23 $y = $1;
23 $m = $2; 24 $m = $2;
24 $d = $3; 25 $d = $3;
25 $mname = ucfirst MonthNameEng($m); 26
27$mname = $m;
28# $mname = ucfirst MonthNameEng($m);
29 if ($y != $lasty) {
30 print "</tr><tr>\n" if $lasty != 0;
31 print "<th>$y</th>\n";
32 $lasty = $y;
33 } else {
34 print "</tr><tr>\n<th></th>" if ( $m != $lastm );
35 }
36
26 if ( $m != $lastm ) { 37 if ( $m != $lastm ) {
27 $count=0; 38 $count=0;
28 print "</tr><tr>\n" if $lastm != 0;
29# if ( $m % 6 == 0 ) {
30# print "</tr><tr valign=top>\n";
31# }
32 print "<th>$mname</th>\n"; 39 print "<th>$mname</th>\n";
33 $lastm = $m; 40 $lastm = $m;
34 } 41 }
35# $lines = `wc -l $file` + 0; 42
36# print "<li><a test href=\"$file\">$mname $d</a> <small>($lines lines)</small>\n";
37 print "<td><a test href=\"$file\">$d</a></td>\n"; 43 print "<td><a test href=\"$file\">$d</a></td>\n";
44
38 if ( ++$count > 15 ) { 45 if ( ++$count > 15 ) {
39 print "</tr><tr><th></th>\n"; 46 print "</tr><tr><th></th><th></th>\n";
40 $count=0; 47 $count=0;
41 } 48 }
42 } 49 }
43 } 50 }
44 #print "<li><a href=\"daily/$_\">$_</a> ($size bytes) $log\n";
45} 51}
46print "</ul></td></tr></table>\n"; 52print "</ul></td></tr></table>\n";