Compare commits
3 commits
d02ae5e2ff
...
3e3f36ad96
Author | SHA1 | Date | |
---|---|---|---|
|
3e3f36ad96 | ||
|
0f042a3cdc | ||
|
61027d5f3d |
0
bin/clientstats.pl
Normal file → Executable file
0
bin/clientstats.pl
Normal file → Executable file
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
Loading…
Reference in a new issue