This describes the configuration commands available for definition of reports for the clerk. For further information about configuration commands refer to the Config manpage.
report [ name ... ]report command are for the mentioned
reports. I.e. this command builds a scope for report definition commands.
Value of the unscoped command itself is an array.
A report may contain sub reports, which are given together with the calling report. This may be nested. In a given output stream the sub reports come first.
rpSub [ name ... ]Value is an array.
A report presents information from a mail database. The following commands define, which database to use.
rpInArc listlsArchive command.
This defaults to the database set by mailDBFile.
Value is a scalar.
The following commands define criteria on which to select the entries in a mail data base.
Multiple selections form a logical and (i.e. only posts, which meet all selection criteria are considered).
If no selection is made, all entries are selected.
rpSelPlainValue is being set.
rpSelNewValue is being set.
The selected posts are sorted in some way. The sorting order to use is defined by the following commands.
Every sorting definition has a first argument sgnf, which is an integer. The
absolute value of sgnf defines the order in which multiple sorts are applied
to the selected posts. Low values are most significant (i.e. 1 is the most
important sorting criterion). A negative sign of sgnf reverses the ascending
order, which is used for positive values. 0 is not allowed for sgnf.
If no sort order is given, the order of the posts is undefined.
rpSortNew sgnfValue is a scalar.
rpSortDate sgnf [hdr]hdr defaults to "Date".
Value is an array.
The report (usually) contains only part of the selected and sorted posts. The following commands define, which parts of a post are output, and how they appear.
If no such command is given, the post has no contents at all. This may be used for reports, which consist of sub-reports only.
rpFmtFlds template...$). The following
field types are defined:
$header:$-).
Every field header has to appear in the data base part of the post. Header fields in plain posts are not considered. Moreover only the first field of possibly multiple is used.
$range:$[begin][..][end]
begin and end are line numbers and must consist of digits only. A leading
minus sign (-) counts line numbers from the bottom of the mail. The lines
starting with line number begin and ending before line end are taken.
If begin is not given, it defaults to 1, the first line of the body. (The
empty line after the header does not belong to the header, nor does it belong
to the body.)
If end is not given, it defaults to 0, the imaginary line after the last
line of the body.
If begin and end are given, or both are missing, the .. is not
optional. A .. denotes the whole post.
It is no error, if begin is greater than end, but results in an empty range, or if the post contains less than the wanted lines.
$$The templates are filled in for every selected post in the chosen order, a trailing newline is added, and they are concatenated to one string.
Though a missing or completly empty template is permitted, it makes little sense, since this generates only an empty output.
Value is an array with parsed alternating fixed text and header fields.
rpFmtSubj template$). The
following field types are defined:
$archive$rpInArc command or results in an empty string.
$timeNew$rpSelNew command has been given. Time is written in GMT.
$timeCur$$$Value is an array with parsed alternating fixed text and header fields.