Compare commits

...

3 commits

Author SHA1 Message Date
Thomas Hochstein 3e3f36ad96 Set exeutable bit for new scripts.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-05-31 21:47:59 +02:00
Thomas Hochstein 0f042a3cdc Let dopostingstats default to last month.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-05-31 21:43:19 +02:00
Thomas Hochstein 61027d5f3d Add clientstats to dopostingstats.
Signed-off-by: Thomas Hochstein <thh@thh.name>
2025-05-31 18:34:06 +02:00
6 changed files with 9 additions and 5 deletions

0
bin/clientstats.pl Normal file → Executable file
View file

0
bin/hoststats.pl Normal file → Executable file
View file

0
bin/postingstats.pl Normal file → Executable file
View file

14
contrib/dopostingstats.sh Normal file → Executable file
View 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
View file

0
contrib/yearstats.sh Normal file → Executable file
View file