It should be pretty easy to hack such an animal in perl. Right now
I have a utility that renames archive news files as a preliminary for
archiving comp.sources.* to floppy disk.
As an initial design how about running find /usr/spool/news -ctime 1
-print to find new news articles and then parsing the Subject line
for the string FAQ.
You will probally need a copy/rename function to translate files names ...
Hmm, maybe copy /usr/spool/news/GROUP/0000 /u/ftp/FAQS/GROUP If your file
system only supports 14 chars then some group renaming/mapping function
will be required.
A modification of this utility could provide you with a daily or weekly
posting list of your favorite authors or topics.
Bill England
weng...@stepsf.COM
#!/u/bin/perl
##
# As a starter here is a perl script that finds some FAQ files
# (This one currently goes through all news files, in pratice
# a -ctime 1 would go into the find.)
#
# Bill England
# weng...@stephsf.com
##
eval "exec /u/bin/perl -S $0 $*"
if $running_under_some_shell;
open (FIND_PIPE, "find /usr/spool/news/ -print|");
while (<FIND_PIPE>){
($fn)=split;
# Skip files that are not text files ... ( Skip Directory names )
#
next unless -T "$fn";
open(IN_NEWS, $fn);
while(<IN_NEWS>){
local($subject);
($junk, $subject)= split(/: /, $_, 2) if /^Subject: /;
if ($subject){
chop($subject);
printf("name: %s, Subject: %s\n", $fn, $subject)
if $subject =~ /^Freq/;
last; # IN_NEWS
}
}
} # end of find_pipe
--
+- Bill England, weng...@stephsf.COM -----------------------------------+
| * * H -> He +24Mev |
| * * * ... Oooo, we're having so much fun making itty bitty suns * |
|__ * * ___________________________________________________________________|
This gives me at least the local article numbers of the FAQ articles.
I expect the server would not like me to implement a command that searches
all groups for FAQ subjects :-)
(no, the script IS too ugly for posting :-)
Harald Tveit Alvestrand
Harald.A...@elab-runit.sintef.no
C=no;PRMD=uninett;O=sintef;OU=elab-runit;S=alvestrand;G=harald
+47 7 59 70 94