NAME
    postingstats - format and post reports

SYNOPSIS
    postingstats [-Vh] [-t *groups|hosts|clients*] [-m *YYYY-MM*]

REQUIREMENTS
    See "README" in doc.

DESCRIPTION
    This script will re-format reports on newsgroup usage created by
    groupstats.pl, hoststats.pl or clientstats.pl and create a message that
    can be posted to Usenet.

  Features and options
    postingstats will create a table with entries numbered from most to
    least and percentages calculated from the sum total of all values.

    It depends on a sorted list on STDIN in *dump* format with *sums*;
    *versions* from clientstas.pl are optional.

    postingstats needs a --type and a --month to create a caption and select
    matching lead-ins and lead-outs. --type is also needed to catch the
    correct sum total from input which differs between *groups* on one hand
    and *hosts* or *clients* on the other hand.

    It will default to posting statistics (number of postings per group) and
    last month.

    Output from postingstats can be piped to any "inews" implementation,
    e.g. "tinews.pl" from
    <ftp://ftp.tin.org/pub/news/clients/tin/tools/tinews.pl> (present in
    "/contrib/").

  Configuration
    Configuration is done by changing the code in the "----- configuration
    -----" section.

    $TLH
       Top level hierarchy the report was created for. Used for display and
       sum total (only for *groups*).

    %Heading
       Hash with keys for *GroupStats*, *HostStats* and *ClientStats*. Used
       to display a heading.

    %TH
       Hash with keys for *counter*, *value* and *percentage*. Used to
       create the table header for *number*, *quantity* and *percentage*.

       *counter* must not be longer than 3 characters, *value* no longer
       than 6 characters and *percentage* no longer than 7 characters.
       Output will be truncated otherwise.

    %LeadIn
       Hash with keys for *GroupStats*, *HostStats* and *ClientStats*. Used
       to create the headers for the postings. Can contain other text that
       will be shown before %Heading.

    %LeadOut
       Hash with keys for *GroupStats*, *HostStats* and *ClientStats*. Will
       be shown at the end of the posting.

OPTIONS
    -V, --version
       Display version and copyright information and exit.

    -h, --help
       Display this man page and exit.

    -t, --type *groups|hosts|clients*
       Set report type to posting statistics, hosts statistics or client
       statistics accordingly.

    -m, --month *YYYY-MM*
       Set month (for display only).

INSTALLATION
    See "INSTALL" in doc.

USAGE
    Create a posting from a posting statistics report for last month:

        groupstats.pl --nocomments --sums --format dump | postingstats.pl -t groups

    Create a posting from a posting statistics report for 2012-01:

        groupstats.pl --nocomments --sums --format dump -m 2012-01 | postingstats.pl -t groups -m 2012-01

    Create a posting from a host statistics report for last month:

        hoststats.pl --nocomments --sums --format dump | postingstats.pl -t hosts

    Create a posting from a client statistics report for last month:

        clientstats.pl --nocomments --sums --versions --format dump | postingstats.pl -t clients

FILES
    bin/postingstats.pl
        The script itself.

    lib/NewsStats.pm
        Library functions for the NewsStats package.

    etc/newsstats.conf
        Runtime configuration file.

BUGS
    Please report any bugs or feature requests to the author or use the bug
    tracker at <https://code.virtcomm.de/thh/newsstats/issues>!

SEE ALSO
    - "README" in doc

    - "INSTALL" in doc

    - groupstats -h

    - hoststats -h

    - clientstats -h

    This script is part of the NewsStats package.

AUTHOR
    Thomas Hochstein <thh@thh.name>

COPYRIGHT AND LICENSE
    Copyright (c) 2010-2012, 2025 Thomas Hochstein <thh@thh.name>

    This program is free software; you may redistribute it and/or modify it
    under the same terms as Perl itself.

