1BATCHER(8)                InterNetNews Documentation                BATCHER(8)
2
3
4

NAME

6       batcher - Article batching for InterNetNews
7

SYNOPSIS

9       batcher [-rv] [-a articles] [-A total-articles] [-b size] [-B total-
10       size] [-i string] [-N batches] [-p process] [-s separator] host [input]
11

DESCRIPTION

13       batcher reads a list of files and prepares news batches for the
14       specified host.  It is generally used to prepare UUCP feeds, but the
15       resulting batches can be used by any application that uses rnews(8) to
16       inject the articles.  It is normally invoked by a script run out of
17       cron that uses shlock to lock the host, followed by ctlinnd to flush
18       the batch file.  See send-uucp(8) for a front-end for batcher.
19
20       batcher reads the file input, or standard input if no file is given.
21       If input is a relative file name, it is assumed to be in pathoutgoing
22       as set in inn.conf.  Blank lines and lines starting with a number sign
23       ("#") are ignored.  All other lines in the input should consist of one
24       or two fields separated by a single space.  The first field is the
25       storage API token of an article.  The second field, if present,
26       specifies the size of the article in bytes.
27
28       By default, batches are written to standard output (which isn't very
29       useful if more than one batch is output), but see the -p option.
30

OPTIONS

32       -a articles
33           This flag limits the number of articles included in each batch.
34           The default is no limit.  A new batch will be started when either
35           the total bytes or the number of articles written exceeds the
36           specified limits.
37
38       -A total-articles
39           Limits the total number of articles written for all batches.  As
40           soon as the total number of articles written to batches reaches or
41           exceeds total-articles, all additional articles in the input will
42           be deferred.  The default is no limit.
43
44       -b size
45           This flag sets the size limit for each batch; as soon as at least
46           this much data has been written out, a new batch will be started.
47           The default size is 60 KB.  Using "-b 0" will allow unlimited batch
48           sizes.
49
50       -B total-size
51           Limits the total number of bytes written for all batches.  As soon
52           as the total bytes written to batches reaches or exceeds total-
53           size, all additional articles in the input will be deferred.  The
54           default is no limit.
55
56       -i string
57           A batch starts with an identifying line to specify the unpacking
58           method to be used on the receiving end.  When this flag is used,
59           string, followed by a newline, will be output at the start of each
60           batch.  The default is to have no initial string (under the
61           assumption that either the processor specified with the -p flag or
62           some other later process will add the appropriate line).
63
64       -N batches
65           Limits the total number of batches written.  As soon as the number
66           of batches written reaches or exceeds batches, all additional
67           articles in the input will be deferred.  The default is no limit.
68
69       -p process
70           By default, batches are written to standard output, which is not
71           useful when more than one output batch is created.  If this option
72           is given, each batch will instead be fed via a pipe to the shell
73           command process.  The process argument must be an sprintf(3) format
74           string, which may have a single %s parameter that will be replaced
75           with the host name.
76
77           A common value is:
78
79               ( echo '#! gunbatch' ; exec gzip -c ) | uux - -r -z %s!rnews
80
81           which generates gzip-compressed batches and feeds them to uux.
82
83       -r  By default, batcher reports errors to pathlog/errlog.  To suppress
84           this redirection and report errors to standard error, use the -r
85           flag.
86
87       -s separator
88           Each article in a batch starts with a separator line that indicates
89           the size of the article.  separator must be an sprintf(3) string,
90           which may have a single %ld in the string that will be replaced
91           with the size of the article.  If the separator is not empty, a
92           newline will also be appended to it when it is added to the
93           beginning of each article.
94
95           The default separator is:
96
97               #! rnews %ld
98
99           and this should rarely be changed.
100
101       -v  Upon exit, batcher reports statistics via syslog.  With this flag,
102           the statistics will also be printed to standard output.
103

EXIT STATUS

105       If the input is exhausted and all batches are created successfully,
106       batcher will exit with a zero status.
107
108       If any of the limits specified with -A, -B, or -N flags are reached, or
109       if there is an error in writing a batch, batcher will try to spool the
110       remaining input by copying it to a file as follows:
111
112       • If there was no input filename, the remaining input will be copied to
113         pathoutgoing/host.
114
115       • If an input filename was given, the remaining input will be copied to
116         a temporary file named by appending ".bch" to the end of input (and
117         qualified by adding pathoutgoing if input was not a fully qualified
118         path).  If this happens successfully, batcher will then try to rename
119         this temporary file to input (thus replacing input with a copy of
120         itself with all of lines for the successfully batched articles
121         removed).
122
123       Upon receipt of an interrupt or termination signal, batcher will finish
124       batching the current article, close the batch, and then rewrite the
125       batch file as described above.
126

HISTORY

128       Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.  Rewritten
129       by Russ Allbery <eagle@eyrie.org> in POD.
130

SEE ALSO

132       ctlinnd(8), inn.conf(5), newsfeeds(5), rnews(8), send-uucp(8),
133       shlock(1).
134
135
136
137INN 2.6.5                         2022-01-23                        BATCHER(8)
Impressum