[net.sources] Programs for accessing archived news articles

ka (12/04/82)

#                   USENET ARCHIVE ACCESS ROUTINES
# 
# This file contains the getar and lsar programs, and a manual page
# describing their use.
# 
# Unless your machine talks to spanky directly, these routines must
# be modified to reflect the address of spanky from your machine.
# Note that both "to" (the path used to send mail to the user "netar"
# on spanky), and "from" (the path used by netar to send the response
# back to the requester) must be modified.  The following machines
# talk to spanky: hocda hojo* houx* mhtsa pwbz whlmos.
# 
# You may want to keep copies of the article lists produced by lsar
# on the local machine.  You could write a shell script to fetch lists
# and run it every weekend.
# 
cat >getar <<\@@@
to=spanky!netar
from=`uname`!$LOGNAME
if test $# != 1
then	echo usage: $0 article-id
	exit 1
fi
(	echo 'Subject: USENET Archive Request'
	echo "Request: get $1"
	echo "Reply to: $from"
) | mail "$to"
@@@

cat >lsar <<\@@@
to=spanky!netar
from=`uname`!$LOGNAME
if test $# != 1
then	echo usage: $0 newsgroup
	exit 1
fi
(	echo 'Subject: USENET Archive Request'
	echo "Request: list $1"
	echo "Reply to: $from"
) | mail "$to"
@@@

cat > getar.1 <<\@@@
.TH GETAR 1
.SH NAME
lsar, getar \- fetch old USENET articles
.SH SYNOPSIS
.B lsar
newsgroup
.br
.B getar
article-id
.SH DESCRIPTION
Lsar produces a list of all the articles in the specified newsgroup.
Getar fetches the USENET article with the specified article id.
In both cases, the response will be sent to you via mail(1).
@@@