Article View: news.software.readers
Article #142Re: automatic posting
From: Mitchell Wyle
Date: Thu, 27 Jun 1991 12:00
Date: Thu, 27 Jun 1991 12:00
70 lines
2666 bytes
2666 bytes
In <1991Jun25.205607.22585@admiral.uucp>
doug@admiral.uucp (Doug Fields) explains:
>:>Where can I get a program that allows to post a ready-made article
>:>into predetermined newsgroups without ANY user intervention.
>
>Write one. Put this line into your crontab:
>
>0 0 * * * /usr/local/lib/news/inews -h </mydir/myfile
>
>That'll do the trick. However, that would be very annoying and piss alot
>of people off on the net.
As long as the distributions are local, no harm done.
I gateway stuff from local BBS's to local usenet groups
auto-magically. I also do manual (user-level) mailing-list to local
group gatewaying.
A typical script (accepts std in) looks like this:
#!/bin/sh
#
# Undigestify IR-List messages, and post individual articles
# Coder Date Comments
# =========== ======== ===============================================
# M F Wyle 11dec89 IR-List digest articles -> inf.ir
awk 'BEGIN { inart = 0 ; AN = 0 ; Sq = "'"'"'" }
{
if ( $1 == "Fr:" ){
inart=1
AN++
if ( AN > 1 ) {
print ""
print "EOM_END_OF_ARTICLE__"
print "/usr/lib/news/inews -h < /tmp/temp"
print "/bin/rm -f /tmp/temp"
}
s = ""
print " cat > /tmp/temp << " Sq "EOM_END_OF_ARTICLE__" Sq
for (i=2 ; i <= NF ; i++) s = s " " $i ;
print "Reply-To: " s
print "From: wyle@inf.ethz.ch"
print "Newsgroups: inf.ir"
s = ""
getline
for (i=2 ; i <= NF ; i++) s = s " " $i ;
print "Subject: " s
print "Distribution: inf"
print ""
}
if ( inart ) {
if ( $1 == "**********" ) {
inart = 0
} else {
print $0
}
}
}
END {
print "EOM_END_OF_ARTICLE__"
print "/usr/lib/news/inews -h < /tmp/temp"
print "/bin/rm -f /tmp/temp"
}' | /bin/sh
/bin/rm -f /tmp/temp
Another program or script running out of crontab gathers the articles
from their sources.
Technical Details
Message-ID:
<1991Jun27.120030.24842@bernina.ethz.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!mcsun!cernvax!chx400!bernina!wyleReferences:
<1991Jun24.151816.2387@ira.uka.de> <1991Jun25.205607.22585@admiral.uucp>Show Full Headers
Complete Article Headers
Message-ID: <1991Jun27.120030.24842@bernina.ethz.ch> Subject: Re: automatic posting Date: Thu, 27 Jun 1991 12:00:30 +0000 From: wyle@nessie.cs.id.ethz.ch (Mitchell Wyle) References: <1991Jun24.151816.2387@ira.uka.de> <1991Jun25.205607.22585@admiral.uucp> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!mcsun!cernvax!chx400!bernina!wyle Newsgroups: news.software.readers Sender: news@bernina.ethz.ch (USENET News System) Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH Lines: 70 Nntp-Posting-Host: nessie