[news.admin] Undigestifier in [ri]news?

wyle@inf.ethz.ch (Mitchel Wyle) (08/22/89)

Does anyone have *any* way of un-digest-ifying stuff like RISKS into
separate articles?

I am about to try to fit Dan Heller's undigestifier from mush into inews
here (or write my own if it won't fit).

If anyone (Brad?  Kurt?  Tom?) has done this, I'd be much obliged for
tips.  E.g. where in inews should an undigestifier be spliced?

Cheers,  -Mitch

amos@taux01.UUCP (Amos Shapir) (08/23/89)

(I didn't notice the original poster directed followups to unix.questions
only, so here it is for the benefit of those who read only the .news
groups, for whom this may be more relevant.  Apologies to readers
of both categories).

In article <986@ethz-inf.UUCP> wyle@inf.ethz.ch () writes:
>Does anyone have *any* way of un-digest-ifying stuff like RISKS into
>separate articles?

Thanks to help from various places on the net, I came up with this:
In your sys file, put the line:

UNDIG:world,comp.risks::/usr/lib/news/undig

Where /usr/lib/news/undig contains the following.  Basically, it
cuts the digest above each Subject line, and breaks it into individual
articles which are posted locally.  (I guess this could be done with one
'sed', but since it works I never bothered to change it).


		o /		o /		o /		o /
--Cut-here-------X---------------X---------------X---------------X----
		o \		o \		o \		o \

#!/bin/sh
#Undigestify digests and post individual articles
TMP=/tmp/undig$$
trap "rm $TMP" 0 1 2 15
cat $* > $TMP

ed - $TMP << 'END'
g/^Subject: /?^$?c\
End-Of-Article\
/usr/lib/news/inews -h << 'End-Of-Article'\
Distribution: local\
Approved: netnews\
.
g,/usr/lib/news/inews ,/^Newsgroups: /t.
?^End-Of-Article?+1;$d
1;/^End-Of-Article/d
w
q
END
sh $TMP

		o /		o /		o /		o /
--Cut-here-------X---------------X---------------X---------------X----
		o \		o \		o \		o \
-- 
	Amos Shapir		amos@taux01.nsc.com or amos@nsc.nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322
34 48 E / 32 10 N			(My other cpu is a NS32532)