| 90,7 → 90,6 |
| my $formatter = new Number::Format( |
| -decimal_point => $decimal_point, |
| -thousands_sep => $thousands_sep, |
| |
| # -grouping => $grouping[0] |
| ); |
| |
| 315,7 → 314,7 |
| dmsg($ua) if DEBUG; |
| } |
| |
| ## The User Agent for User-Agent by number of posts |
| ## The User Agent for User-Agent by number of articles |
| get_agent($msg); |
| |
| ## Get all cross-posted newsgroups |
| 326,11 → 325,11 |
| |
| ## Get threads |
| my $thread = $msg->study('Subject'); |
| $thread =~ s/^\s*re:\s*//i; # Remove Re: or re: at the start |
| $thread =~ s/^\s*re:\s*//i; # Remove Re: or re: at the start |
| $thread =~ s/\s*\(was:\s*.*\)\s*$//i; # Remove (was: ...) at the end |
| $thread =~ s/\s+/ /g; # collapse whitespace |
| $threads{$thread}{'count'}++; # bump count of this subject |
| $threads{$thread}{'size'} += $filesize; # bump bytes for this thread |
| $thread =~ s/\s+/ /g; # collapse whitespace |
| $threads{$thread}{'count'}++; # bump count of this subject |
| $threads{$thread}{'size'} += $filesize; # bump bytes for this thread |
| |
| ## Is this an original post or a reply? |
| if ( defined $msg->study('References') ) |
| 606,8 → 605,9 |
| print "=" x 76, "\n"; |
| printf "%s\n", |
| centred( |
| __x( "Analysis of posts to {newsgroup}", newsgroup => $newsgroup_name ), |
| 76 ); |
| __x( "Analysis of articles to {newsgroup}", newsgroup => $newsgroup_name ), |
| 76 |
| ); |
| print "=" x 76, "\n"; |
| printf "%s\n", |
| centred( |
| 617,7 → 617,7 |
| 76 |
| ); |
| print "\n\n"; |
| printf __"Total posts considered: %s over %d days\n", |
| printf __"Total articles considered: %s over %d days\n", |
| $formatter->format_number($totalposts), |
| $formatter->format_number($numdays); |
| my $time_locale = setlocale(LC_TIME); |
| 639,7 → 639,7 |
| printf __"Original articles: %s; replies: %s\n", |
| $formatter->format_number($origposts), |
| $formatter->format_number($replies); |
| printf __"Total size of posts: %s bytes (%s)" . "\n", |
| printf __"Total size of articles: %s bytes (%s)" . "\n", |
| $formatter->format_number($totsize), |
| $formatter->format_bytes( $totsize, ( 'precision' => 1, 'mode' => 'iec' ) ); |
| printf __"Average %s articles per day, %s per day, %s bytes per article\n", |
| 754,7 → 754,7 |
| printf "%s\n", |
| centred( |
| __x( |
| "Top {count} responders by original text (> 5 posts)", |
| "Top {count} responders by original text (> 5 articles)", |
| count => $topposters |
| ), |
| 76 |
| 796,7 → 796,7 |
| printf "%s\n", |
| centred( |
| __x( |
| "Bottom {count} responders by original text (> 5 posts)", |
| "Bottom {count} responders by original text (> 5 articles)", |
| count => $topposters |
| ), |
| 76 |
| 952,7 → 952,10 |
| } |
| printf "%s\n", |
| centred( |
| __x( "Top {count} user agents by number of posts", count => $topagents ), |
| __x( |
| "Top {count} user agents by number of articles", |
| count => $topagents |
| ), |
| 76 |
| ); |
| print "=" x 76, "\n"; |
| 984,7 → 987,9 |
| $count = $toptz; |
| } |
| printf "%s\n", |
| centred( __x( "Top {count} time zones", count => $toptz ), 76 ); |
| centred( |
| __x( "Top {count} time zones by number of articles", count => $toptz ), |
| 76 ); |
| print "=" x 76, "\n"; |
| my $i = 0; |
| foreach my $zone ( sort { $tz{$b} <=> $tz{$a} } keys %tz ) |
| 1074,4 → 1079,4 |
| { |
| my ( $level, @msg ) = @_; |
| print STDERR @msg, "\n" if $level >= DEBUG; |
| } |
| } |