Add tinews.pl and some shell scripts to /contrib.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2025-05-18 13:54:57 +02:00
parent 9b6bf3e194
commit 8c9d450d47
6 changed files with 1535 additions and 2 deletions

View file

@ -211,7 +211,8 @@ It will default to posting statistics (number of postings per group)
and last month.
Output from B<postingstats> can be piped to any C<inews> implementation,
e.g. C<tinews.pl> from L<ftp://ftp.tin.org/pub/news/clients/tin/tools/tinews.pl>.
e.g. C<tinews.pl> from L<ftp://ftp.tin.org/pub/news/clients/tin/tools/tinews.pl>
(present in C</contrib/>).
=head2 Configuration

View file

@ -0,0 +1,9 @@
#!/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/cliservstats.pl -t server --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'
fi

1506
contrib/tinews.pl Normal file

File diff suppressed because it is too large Load diff

11
contrib/yearstats.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# installation path is /srv/newsstats/, please adjust accordingly
# $1: newsgroup
echo "Stats for $1"
cd /srv/newsstats/
for year in {2012..2022}
do
echo -n "${year}: "
bin/groupstats.pl -m $year-01:$year-12 -r sums -n $1
done

View file

@ -21,6 +21,7 @@ NewsStats 0.3.0 (unreleased)
* Fix call to GetMaxLength() in cliservstats.
* Fix typos in documentation, update sample config file.
* Move database creation from install/install.pl to bin/dbcreate.pl
* Add tinews.pl and some shell scripts to /contrib.
NewsStats 0.2.0 (2025-05-10)
* Redo directory structure:

View file

@ -54,7 +54,12 @@ Prerequisites
Installation instructions
See INSTALL.
See INSTALL.
Documentation is in /doc, configuration in /etc, the NewsStats
module in /lib and most scripts in /bin, while /contrib has some
sample scripts that may have to be adjusted to work in your
configuration.
Getting Started