NAME
    postingstats - format and post reports

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

REQUIREMENTS
    See "README" in doc.

DESCRIPTION
    This script will re-format reports on newsgroup usage created by
    groupstats.pl or cliservstats.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*.

    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.

    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.

    %Heading
       Hash with keys for *GroupStats* and *HostStats*. 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* and *HostStats*. Used to create the
       headers for our posting. Can contain other text that will be shown
       before %Heading.

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

OPTIONS
    -V, --version
       Print out version and copyright information and exit.

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

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

    -m, --month *YYYY-MM*
       Set month for display.

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 | postingstats.pl -t groups -m 2012-01

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

        cliservstats.pl -t server --nocomments --sums --format dump | postingstats.pl -t hosts

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

    - l>doc/INSTALL>

    - groupstats -h

    - cliservstats -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.

