Compare commits

...

6 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
Thomas Hochstein 1cd7cdb83a Add README.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2024-05-26 00:10:57 +02:00
3 changed files with 26 additions and 7 deletions

13
README.md Normal file
View file

@ -0,0 +1,13 @@
# usestats
**usestats** generates statistics about newsgroups by analysing existing postings and creating various reports.
## Description
On Usenet, the generation of statistics about newsgroups and their participants was en vogue for quite some time. The number of postings per month or day or per participant, the number of postings with a specific subject, the popularity of newsreaders used and the number of users per newsreader were counted.
**usestats** is one of the scripts that can be used to generate such statistics.
## More information
Please see the [distribution page](https://th-h.de/net/software/usestats/) (in German).

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}++;