From f2d775169134cca6c51a403a24585c6312eaa5d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20=C3=89LIE?= Date: Sat, 20 Nov 2021 11:29:49 +0100 Subject: [PATCH] buffchan: Add an example of use in newsfeeds --- doc/pod/buffchan.pod | 46 +++++++++++++++++++++++++++++--------------- samples/newsfeeds.in | 5 +++++ 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/doc/pod/buffchan.pod b/doc/pod/buffchan.pod index 72f083d8f..95426f065 100644 --- a/doc/pod/buffchan.pod +++ b/doc/pod/buffchan.pod @@ -90,8 +90,9 @@ has been open for more than I seconds. =item B<-d> I -This flag may be used to specify a directory the program should change to -before starting. If this flag is used, the default for the B<-s> flag +By default, B writes its output into the I directory. +This flag may be used to specify a directory the program should change +to before starting. If this flag is used, the default for the B<-s> flag (see below) is changed to be a simple C<%s> (in other words, output files are considered to be relative to I). @@ -122,7 +123,10 @@ In the map file, blank lines and lines starting with a number sign (C<#>) are ignored. All other lines should have two host names separated by a colon. The first field is the name that may appear in the input stream; the second field names the file to be used when the name in the first -field appears. For example: +field appears. + +For example, the following map file may be used to map the short names used +in the example below to the full domain names: # This is a comment uunet:news.uu.net @@ -159,25 +163,35 @@ If the B<-u> flag is used, the output will be unbuffered. If B is invoked with C<-f 2> and given the following input: - news/software/b/132 <1643@munnari.oz.au> foo uunet - news/software/b/133 <102060@litchi.foo.com> uunet munnari - comp/sources/unix/2002 <999@news.foo.com> foo uunet munnari + news.software.nntp <1643@munnari.oz.au> foo uunet + news.software.nntp <102060@litchi.foo.com> uunet munnari + comp.sources.unix <999@news.foo.com> foo uunet munnari + +then the file F in I will have these lines: + + news.software.nntp <1643@munnari.oz.au> + comp.sources.unix <999@news.foo.com> + +the file F in I will have these lines: -Then the file F will have these lines: + news.software.nntp <102060@litchi.foo.com> + comp.sources.unix <999@news.foo.com> - news/software/b/132 <1643@munnari.oz.au> - comp/sources/unix/2002 <999@news.foo.com> +and the file F in I will have these lines: -the file F will have these lines: + news.software.nntp <1643@munnari.oz.au> + news.software.nntp <102060@litchi.foo.com> + comp.sources.unix <999@news.foo.com> - news/software/b/133 <102060@litchi.foo.com> - comp/sources/unix/2002 <999@news.foo.com> +Using B this way can be done in F with for instance: -and the file F will have these lines: + foo:*,@misc.*:Ap,Tm:buffchan! + munnari:*,@rec.*:Ap,Tm:buffchan! + uunet:*:Ap,Tm:buffchan! + buffchan!:*:Tx,WGm*:/buffchan -u -f 2 - news/software/b/132 <1643@munnari.oz.au> - news/software/b/133 <102060@litchi.foo.com> - comp/sources/unix/2002 <999@news.foo.com> +It will generate the examples above. See the C flag in newsfeeds(5) +for how to parameter the output. =head1 HISTORY diff --git a/samples/newsfeeds.in b/samples/newsfeeds.in index 46c36d100..e6e6554b4 100644 --- a/samples/newsfeeds.in +++ b/samples/newsfeeds.in @@ -135,6 +135,11 @@ controlchan!\ #news2mail!:!*:Ac,Tc,Wn*:@bindir@/news2mail #list-big-red-ants/lists.ucsd.edu:!*,rec.pets.red-ants:Ap,Tm:news2mail! +# Example of an exploder feed. See buffchan(8) for more details. +#foo:news.*:Ap,Tm:buffchan! +#uunet:*:Ap,Tm:buffchan! +#buffchan!:*:Tx,WGm*:@bindir@/buffchan -u -f 2 + # Capture all local postings (with a distribution of "foo" and no more # than two sites in the Path header field body) using a local program (that # doesn't come with INN).