Compare commits

...

5 commits

Author SHA1 Message Date
Thomas Hochstein b9cf845104 Update changes.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-01-10 17:28:50 +01:00
Thomas Hochstein c25a20d679 Update author's mail address.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-01-10 17:25:15 +01:00
Thomas Hochstein 36d02b3364 Delta_Format() has a new parameter.
Fix @format string, too.

Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-01-10 17:23:36 +01:00
Thomas Hochstein 1a57eb600f Mail::Address->parse->name fails with UTF-8 qp.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-01-10 17:02:13 +01:00
Thomas Hochstein a46201004c Date_Init("tz") is deprecated.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-01-10 17:01:00 +01:00
2 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,9 @@
v 0.18: []
Fix: From:-Header mit MIME words in q/p in UTF-8 wurden nicht richtig
dekodiert.
Fix: Die Parameter für Date_Init() und Delta_Format() haben sich in
den letzten 20 Jahren geändert.
Chg: Neue Mailadresse.
v 0.17: [20041003]
Neu: eingelesene Daten können gespeichert werden
Neu: Anzahl der Postings wird auch pro Monat ausgegeben

View file

@ -3,7 +3,7 @@
# usestats.pl
#############
# (c) 10/2003-10/2004 Thomas Hochstein <thh@inter.net>
# (c) 10/2003-10/2004 Thomas Hochstein <thh@thh.name>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
@ -24,7 +24,7 @@ use Mail::Address;
use MIME::Words qw(decode_mimewords);
# Versionsnummer ######################
$ver = '0.17 beta (20041003)';
$ver = '0.18 beta (unreleased)';
# Konstanten #########################
@ -77,7 +77,7 @@ if ($options{'h'}) {
print "$0 v $ver\nUsage: $0 [-hq] [-w|r <savefile>] [-c <configfile>]\n";
exit(0);
};
print STDERR "$0 v $ver [" . scalar(gmtime) . "]\n(c) 10/2003-10/2004 Thomas Hochstein * <thh\@inter.net>\n" if (!$options{'q'});
print STDERR "$0 v $ver [" . scalar(gmtime) . "]\n(c) 10/2003-10/2004 Thomas Hochstein * <thh\@thh.name>\n" if (!$options{'q'});
if ($options{'c'}) {
&readconfig($options{'c'});
};
@ -92,7 +92,7 @@ if (!scalar(grep /$config{'charset'}/, @{$supported})) {
$config{'charset'} = 'ISO-8859-1';
};
&Date_Init("TZ = $config{'tz'}");
&Date_Init("setdate=now,$config{'tz'}");
if ($options{'r'}) {
@postings = @{&readdata($options{'r'})};
@ -195,7 +195,7 @@ if ($config{'day'}) {
if ($postcount > 0) {
printf "\n\nPostings %-14s: %d (%.2f pro Tag)\n",$lastmonat,$postcount,($postcount / Date_DaysInMonth(UnixDate($lastday,"%m"),UnixDate($lastday,"%Y")));
};
$daycount = Delta_Format(DateCalc(ParseDate($firstday),ParseDate($lastday)),0,'%dh');
$daycount = Delta_Format(DateCalc(ParseDate($firstday),ParseDate($lastday)),'approx',0,'%dh');
#D print STDERR "$daycount = $lastday - $firstday\n";
print "\n\n";
if (scalar(@postings)) {
@ -219,7 +219,7 @@ foreach $report (@reports) {
};
};
print "-- \n$0 v $ver [" . scalar(gmtime) . "]\n(c) 10/2003-10/2004 Thomas Hochstein * <thh\@inter.net>\n";
print "-- \n$0 v $ver [" . scalar(gmtime) . "]\n(c) 10/2003-10/2004 Thomas Hochstein * <thh\@thh.name>\n";
exit;
# Subroutinen #########################
@ -415,7 +415,7 @@ sub poster {
if (length($name) > $posterrawlgth) { $posterrawlgth = length($name); };
if (defined($from)) {
# Postings pro Poster (nach From:)
$name = &mime_decode($from->name);
$name = &mime_decode($from->phrase);
};
#D print "::>> $name\n";
$poster{$name}++;