Compare commits
5 commits
6fc4525071
...
0b87e81b08
Author | SHA1 | Date | |
---|---|---|---|
|
0b87e81b08 | ||
|
1a5b9dbcb1 | ||
|
cff76a3c65 | ||
|
18db200aea | ||
|
8afeb09cc2 |
0
bin/clientstats.pl
Normal file → Executable file
0
bin/clientstats.pl
Normal file → Executable file
|
@ -23,7 +23,6 @@ use warnings;
|
|||
use NewsStats qw(:DEFAULT :TimePeriods ListNewsgroups ParseHierarchies ReadGroupList ParseHeaders);
|
||||
|
||||
use DBI;
|
||||
use Data::Dumper;
|
||||
use Encode qw(decode encode);
|
||||
use Getopt::Long qw(GetOptions);
|
||||
Getopt::Long::config ('bundling');
|
||||
|
@ -654,7 +653,8 @@ sub RemoveComments {
|
|||
$Header =~ s/[ _]DE//;
|
||||
|
||||
# remove trailing 'eol' or '-shl'
|
||||
$Header =~ s/(eol)|(-shl)$//;
|
||||
# or ml-inews[-sig]
|
||||
$Header =~ s/(eol)|(-shl)|(ml-inews(-sig)?)$//;
|
||||
|
||||
# remove from ';' or ',' (CrossPoint)
|
||||
# or '&' to end of header
|
||||
|
|
0
bin/hoststats.pl
Normal file → Executable file
0
bin/hoststats.pl
Normal file → Executable file
0
bin/postingstats.pl
Normal file → Executable file
0
bin/postingstats.pl
Normal file → Executable file
14
contrib/dopostingstats.sh
Normal file → Executable file
14
contrib/dopostingstats.sh
Normal file → Executable file
|
@ -1,9 +1,13 @@
|
|||
#!/bin/bash
|
||||
# installation path is /srv/newsstats/, please adjust accordingly
|
||||
if [[ $1 =~ [0-9]{4}-[0-9]{2} ]]; then
|
||||
/srv/newsstats/bin/groupstats.pl --nocomments --sums --format dump --month $1 | /srv/newsstats/bin/postingstats.pl --month $1 | /srv/newsstats/contrib/tinews.pl -X -Y
|
||||
/srv/newsstats/bin/hoststats.pl --nocomments --sums --format dump --month $1 | /srv/newsstats/bin/postingstats.pl -t server --month $1 | /srv/newsstats/contrib/tinews.pl -X -Y
|
||||
else
|
||||
echo 'Input error, please use dopostingstats.sh YYYY-MM'
|
||||
|
||||
# get month
|
||||
MONTH=$1
|
||||
if ! [[ $1 =~ [0-9]{4}-[0-9]{2} ]]; then
|
||||
MONTH=$(date -d "$(date +%Y-%m-15) -1 month" '+%Y-%m')
|
||||
fi
|
||||
|
||||
# post stats
|
||||
/srv/newsstats/bin/groupstats.pl --nocomments --sums --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y
|
||||
/srv/newsstats/bin/hoststats.pl --nocomments --sums --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl -t server --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y
|
||||
/srv/newsstats/bin/clientstats.pl --nocomments --sums --versions --format dump --month $MONTH | /srv/newsstats/bin/postingstats.pl -t client --month $MONTH | /srv/newsstats/contrib/tinews.pl -X -Y
|
||||
|
|
0
contrib/tinews.pl
Normal file → Executable file
0
contrib/tinews.pl
Normal file → Executable file
0
contrib/yearstats.sh
Normal file → Executable file
0
contrib/yearstats.sh
Normal file → Executable file
|
@ -13,6 +13,9 @@ NewsStats 0.4.0 (unreleased)
|
|||
* gatherstats: Truncate overlong clients or versions.
|
||||
* gatherstats: Remove whitespace from client and version.
|
||||
* Fix version queries.
|
||||
* Add ClientStats to dopostingstats.
|
||||
* Let dopostingstats default to last month.
|
||||
* Set executable bit for new scripts.
|
||||
|
||||
NewsStats 0.3.0 (2025-05-18)
|
||||
* Extract GroupStats (in gatherstats) to subroutine.
|
||||
|
|
|
@ -51,7 +51,6 @@ require Exporter;
|
|||
SQLSetBounds SQLBuildClause GetMaxLength)]);
|
||||
$VERSION = '0.4.0';
|
||||
|
||||
use Data::Dumper;
|
||||
use File::Basename;
|
||||
use Cwd qw(realpath);
|
||||
|
||||
|
|
Loading…
Reference in a new issue