Let dopostingstats default to last month.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
8afeb09cc2
commit
18db200aea
|
@ -1,10 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# installation path is /srv/newsstats/, please adjust accordingly
|
# 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
|
# get month
|
||||||
/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
|
MONTH=$1
|
||||||
/srv/newsstats/bin/clientstats.pl --nocomments --sums --versions --format dump --month $1 | /srv/newsstats/bin/postingstats.pl -t client --month $1 | /srv/newsstats/contrib/tinews.pl -X -Y
|
if ! [[ $1 =~ [0-9]{4}-[0-9]{2} ]]; then
|
||||||
else
|
MONTH=$(date -d "$(date +%Y-%m-15) -1 month" '+%Y-%m')
|
||||||
echo 'Input error, please use dopostingstats.sh YYYY-MM'
|
|
||||||
fi
|
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
|
||||||
|
|
|
@ -14,6 +14,7 @@ NewsStats 0.4.0 (unreleased)
|
||||||
* gatherstats: Remove whitespace from client and version.
|
* gatherstats: Remove whitespace from client and version.
|
||||||
* Fix version queries.
|
* Fix version queries.
|
||||||
* Add ClientStats to dopostingstats.
|
* Add ClientStats to dopostingstats.
|
||||||
|
* Let dopostingstats default to last month.
|
||||||
|
|
||||||
NewsStats 0.3.0 (2025-05-18)
|
NewsStats 0.3.0 (2025-05-18)
|
||||||
* Extract GroupStats (in gatherstats) to subroutine.
|
* Extract GroupStats (in gatherstats) to subroutine.
|
||||||
|
|
Loading…
Reference in a new issue