3 # This script processes the logfile given as it first command argument,
4 # and prints a nice report about approved, rejected, etc postings, to
7 # is called from report.sh
10 # get the directory where robomod is residing
11 $MNG_ROOT = $ENV{'MNG_ROOT'} || die "Root dir for moderation not specified";
14 require "$MNG_ROOT/bin/robomod.pl";
16 $logFile = $ARGV[0] || die "A log file name must be specified";
17 open( LOG, $logFile ) || die "Can't open logfile $logFile for reading";
22 $preApprovedCount = 0;
25 $approvedCount++ if( /processApproved/i );
26 $autoCount++ if( /PREAPPROVED/ );
27 $rejectedCount++ if( /processRejected/i );
28 # $approvedCount++ if( /processPreapproved/i );
29 $preApprovedCount++ if( /processPreapproved/i );
34 Approved: $approvedCount messages (of them, $autoCount automatically)
35 Rejected: $rejectedCount messages
36 Preapproved: $preApprovedCount new posters