4 batcher \- article-batching backend for InterNetNews
23 .BI \-N " num_batches"
46 reads uses a list of files to prepare news batches for the specified
48 It is normally invoked by a script run out of
52 to lock the host name, followed by a
54 command to flush the batchfile.
59 file, or standard input if no file is given.
60 Relative pathnames are interpreted from the
61 .I <pathoutgoing in inn.conf>
63 The input is taken as a sequence of lines;
64 blank lines and lines starting with a number sign (``#'') are ignored.
65 All other lines should consist of one or two fields separated by a single space.
66 The first field is either the storage token of an article or the
67 name of a file holding an article; if it is not an an absolute
68 pathname or storage token, it is taken relative to
69 .IR <patharticles\ in\ inn.conf> .
70 The second field, if present, specifies the size of the article in bytes.
74 The ``\-S'' flag may be used to specify an alternate spool directory to
75 use if the article is not found; this would perhaps be an NFS-mounted
76 spool directory of a master server with longer expiration times.
79 By default, the program reports errors to
80 .IR <pathlog\ in\ inn.conf>/errlog .
81 To suppress this redirection and report errors to standard error,
87 reports statistics via
89 If the ``\-v'' flag is used, they will also be printed on the standard
94 collects the text of the named articles into batches.
95 To limit the size of each batch, use the ``\-b'' flag.
96 The default size is 60 kilobytes.
97 Using ``\-b\ 0'' allows unlimited batch sizes.
100 To limit the number of articles in each batch, use the ``\-a'' flag.
101 The default is no limit.
102 A new batch will be started when either the byte count or number of
103 articles written exceeds the specified limits.
106 To limit the total number of bytes written for all batches, use the ``\-B''
110 To limit the total number of articles that can be batched use the ``\-A''
114 To limit the total number of batches that should be created use the ``\-N''
117 In all three of the above cases, the default is zero, that is, no limit.
120 A batch starts with an identifying line to specify the unpacking method
121 to be used on the receiving end.
122 When the ``\-i'' flag is used, the initial string,
124 followed by a newline, will be output at the start of every batch.
125 The default is to have no initial string.
128 Each article starts with a separator line to indicate the size of the article.
129 To specify the separator use the ``\-s'' flag.
132 format string which can have a single ``%ld'' parameter which will be given
133 the size of the article.
134 If the separator is not empty, then the string and a newline will be output
135 before every article.
136 The default separator is ``#!\ rnews\ %ld''.
139 By default, batches are written to standard output, which
140 is not useful when more than one output batch is created.
141 Use the ``\-p'' flag to specify the shell command that should be
144 whenever a new batch is started.
147 format string which can have a single ``%s'' parameter which will be given
153 ( echo '#! cunbatch' ; exec compress ) | uux \- \-r \-z %s!rnews
158 If the input is exhausted,
160 will exit with a zero status.
161 If any of the limits specified with the ``\-B'', ``\-A'', or ``\-N'' flags
162 is reached, or if there is an error writing the batch, then
164 will try to spool the remaining input, copying it to a file.
165 If there was no input filename, standard input will be copied to
166 .I <pathoutgoing in inn.conf>/host
167 and the program will exit.
168 If an input filename was given, the input will be copied to
169 a temporary file named
173 is an absolute pathname)
175 .I <pathoutgoing in inn.conf>/input.bch
176 (if the filename does not begin with a slash).
177 Once the input is copied,
179 will try to rename this temporary file to be the name of the input file,
182 Upon receipt of an interrupt or termination signal,
184 will finish sending the current article, close the batch, and then
185 rewrite the batchfile according as described in the previous paragraph.
187 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.
189 This is revision \\$3, dated \\$4.
191 .R$ $Id: batcher.8 6491 2003-10-18 05:56:37Z rra $