control-summary

(Send a summary report of control activity)

SYNOPSIS

control-summary [-hnprw] [-a address] [-g newsgroup] [-t template] [[start] date]

DESCRIPTION

control-summary prints out, mails, or posts a summary of activity in an active newsgroup database maintained by process-control and update-control, taken from their log files.

If no times are given on the command-line, the activity of the past day is summarized. If one time is given, the activity for that day is summarized. If two times are given, the activity between those two times is summarized. Times may be given in any format that can be parsed by Date::Parse.

Several options are set at the start of this script, including the default e-mail address from which reports are sent and the default newsgroup to which to post. These options should be changed to fit your local installation before using this script.

OPTIONS

-a address, --address=address

Send the message to address rather than the default of usenet-config@isc.org. If you are using this program for your own purposes, please either use this option or change the default address at the top of this script.

-e pattern, --exclude=pattern

Exclude actions for groups matching pattern from the report, where pattern is a regular expression.

-h, --help

Print out this documentation (which is done simply by feeding the script to perldoc -t).

-g newsgroup, --newsgroup=newsgroup

Post the message to newsgroup instead of the default of news.lists.misc. This option only makes sense in combination with -p. If you are using this program for your own purpose, you probably want to either use this option or change the default address at the top of the script if you're posting the results.

-n, --dry-run, --just-print

Rather than mail or post the output, just print the mail message or post that would have been sent to standard out instead.

-p, --post

Rather than mailing the message, post it instead. Note that an Approved header will be added pointing to the sender configured at the top of this script, so be careful with moderated groups.

-r, --raw

Don't format the report and include the newsgroup descriptions. Instead, just print out the actions from the logs.

-t template, --template=template

Rather than using the simple mail or news message format defined in the script, generate the mail or news message from template. This template will be processed by Text::Template and should follow its syntax for embedded code blocks and variables (basically by enclosing Perl expressions in {} and referring to variables as normal in Perl code).

The following variables will be set:

    $start      The starting date of the report as YYYY-MM-DD.
    $end        The ending date of the report as YYYY-MM-DD.
    $address    The address to send the message, for mail reports.
    $newsgroup  The newsgroup to which to post the message, for posts.
    $report     The text of the report, affected by the --raw flag.

$address and $newsgroup are affected by the -a and -g flags.

-w, --weekly

If no or only one date is specified on the command line, use a week as the default interval instead of a day. In other words, if no dates are specified, the report will be for the previous week. If one date is specified, the report will be for the week following that date.

FILES

/srv/control/active.db

The database of currently active newsgroups and their moderation status in Berkeley DB hash format.

/srv/control/logs

The directory containing the log messages from control message processing. These logs are parsed to generate the report.

AUTHOR

Russ Allbery <eagle@eyrie.org>

SEE ALSO

process-control(1), update-control(1)

This script is part of the control-archive package. The control-archive web page at <https://www.eyrie.org/~eagle/software/control-archive/> will have the current version of the package.

Last spun 2022-12-12 from POD modified 2018-02-19