[news.newusers.questions] Automated rn question

euatdt@euas11c05.ericsson.se (Torsten Dahlkvist) (12/01/89)

Here's a problem that's been bugging me lately. I usually run rn in a SunView
tool called "newstool". Basically this is a shell-script loop which runs an
'rn -c' to check for unread mail and changes the icon if the return value
is > 0.

My problem: I have many 'kill' files to cut down the noice in groups where
I nevertheless want to remain active. Unfortunately, 'rn -c' doesn't run
the 'kill' files, so frequently when newstool flashes at me and I look for
news, everything gets killed - a false alarm.

How can I instruct rn to run through all kill files on all subscribed
newsgroups unattended? I'd like to have something like this:

while (1)
	sleep for_a_while
	if (`rn -c` > 0) then
		rn -autokill
	endif
	if (`rn -c` > 0) then
		change_icon news
		rn
		change_icon no_news
	endif
end

Anyone out there with good ideas? E-mail preferred - I'll summarize if anything
turns up.

/Torsten

 Torsten Dahlkvist
 ELLEMTEL Telecommunication Laboratories
 P.O. Box 1505, S-125 25  ALVSJO, SWEDEN
 Tel: +46 8 727 3788

jwm@stda.jhuapl.edu (Jim Meritt) (12/02/89)

In article <2530@erix.ericsson.se> euatdt@euas11c05.ericsson.se (Torsten Dahlkvist) writes:
}
}Here's a problem that's been bugging me lately. I usually run rn in a SunView
}tool called "newstool". Basically this is a shell-script loop which runs an
}'rn -c' to check for unread mail and changes the icon if the return value
}is > 0.
}
}My problem: I have many 'kill' files to cut down the noice in groups where
}I nevertheless want to remain active. Unfortunately, 'rn -c' doesn't run
}the 'kill' files, so frequently when newstool flashes at me and I look for
}news, everything gets killed - a false alarm.
}
}How can I instruct rn to run through all kill files on all subscribed
}newsgroups unattended? I'd like to have something like this:
}
}while (1)
}	sleep for_a_while
}	if (`rn -c` > 0) then
}		rn -autokill
}	endif
}	if (`rn -c` > 0) then
}		change_icon news
}		rn
}		change_icon no_news
}	endif
}end
}
}Anyone out there with good ideas? E-mail preferred - I'll summarize if anything
}turns up.

I use something a little bigger for my "viewing" stunt (on a Sun 3/50).  Here
is what I use to zap through the kill files before I bother...
...................................................

/bin/rm /usr/jwm/killed
echo "~s rrn KILLed list" > /usr/jwm/killed
rnkill -d >> /usr/jwm/killed
/usr/ucb/mail jwm@stdc  </usr/jwm/killed
/bin/rm /usr/jwm/killed
...................................................
where rnkill is:
..................................................
#!/bin/sh
#
# rnkill - shell script to apply rn KILL files in background
# olsen@XN.LL.MIT.EDU (Jim Olsen)
# Jim Olsen  - 14 Mar 89
#
# Options: -d debug mode.  You see all gory action as it happens.

# Visit all newsgroups (if rn asks about anything else, just say no)
export RNMACRO RNINIT
RNINIT='-s -T -t'
RNMACRO=/tmp/rnkill$$
trap 'rm -f $RNMACRO; exit' 1 2 3 15
echo "z %(%m=n?.q^M:n)^(z^)" > $RNMACRO
if test X$1 = X-d; then
      echo "z" | rn
else
      echo "z" | rn >/dev/null 2>&1
fi
rm $RNMACRO
exit 0

...............................................................
That mails me the results of running them.  I have things to locate
specific names, topics, and sites in my kill files so this finds them
and mails me where (group & article #) they are.


"In these matters the only certainty is that nothing is certain"
					- Pliny the Elder
These were the opinions of :
jwm@aplcen.apl.jhu.edu  - or - jwm@aplvax.uucp  - or - meritt%aplvm.BITNET