5 my($period)=$query->param('period');
6 $period = "today" unless defined $period;
9 if($period eq "days") {
10 my($days)=$query->param('days');
11 $days = 1 unless defined $days;
12 if ($days < 1) {$days = 1};
13 $heading = "i-scream CVS commits in the past $days day(s)";
15 $firstdate = `date --date \"$days days ago\" \"+%Y/%m/%d\"`;
17 elsif($period eq "thisweek") {
18 $firstdate = "last Sunday";
19 $heading = "i-scream CVS commits this week";
22 # default to "today only"
23 $firstdate = `/bin/date \"+%Y/%m/%d\"`;
24 $heading = "Today's i-scream CVS commits";
27 print "Content-type: text/html\n\n";
29 my($cvs) = "/usr/bin/cvs";
30 my($cvs2clpath) = "/home/sites/www.i-scream.org.uk/bin/cvs2cl.pl";
31 my($cvsroot) = "/cvs/i-scream";
32 #my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$today'\" -g \"-d$cvsroot\" -g \"-Q\"";
33 my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$firstdate'\" -g \"-d$cvsroot\" -g \"-Q\"";
34 my($updatecmd) = "cd /home/sites/www.i-scream.org.uk/cvsscripttemp && $cvs -d $cvsroot -Q update -d";
35 my($logcmd) = "cd /home/sites/www.i-scream.org.uk/cvsscripttemp && $cvs2clpath $cvs2clargs";
38 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
43 <title>The i-scream Project Daily Commit Log</title>
46 <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066">
48 <a href="http://www.i-scream.org.uk"><img border="0" src="../i-scream.gif"></a>
56 my $modulelist = `ls $cvsroot`;
57 my(@modules) = split (/\s+/, $modulelist);
59 foreach my $module (@modules) {
61 print "<p><h3>$module module</h3>\n";
62 print "<a href=\"/cgi-bin/cvs/viewcvs.cgi/$module\">";
63 print "Browse i-scream "$module" cvs module</a>\n";
66 my(@lines) = `$logcmd $module 2>&1`;
68 print "There have been no commits in this module during this period.";
71 foreach my $line (@lines) {
72 print HTML_encode($line);
76 print "</pre></p>\n\n";
87 #------------------------------------------------------
90 # escape HTML characters that may cause problems when
91 # shown either in the <body> or within text fields.
92 #------------------------------------------------------
95 $encoded =~ s/&/&/g;
96 $encoded =~ s/"/"/g;
97 $encoded =~ s/</</g;
98 $encoded =~ s/>/>/g;