[net.sources] quick news - latest version

tlt@ihlpl.UUCP (Todd) (04/02/86)

Here is a short shell script that allows the user to read/scan a lot
of netnews very quickly.   It keeps track of articles that have been
read.  It also allows you to go back and read an article again.
It maps the ' character to a one keystroke command that goes
immediately to the article you want to read.  Vi experts will note
that typing '' is equivalent to typing 'RETURN.  When you have 
read the article exit vi by typing q and you will be back
looking at the list of news articles.  This version keeps the newslist
around in a file called ".newslist".  Articles that have been read
are marked with a dot ".".  Periodically you must delete the old lines
in the .newslist file.

1. Cut on the dotted lines and put contents into a file called "qn" (quick news).
2. Find where netnews articles are kept on your system and change the
   appropriate line (line 1).
3. Make the file "qn" executable.
4. Enjoy.
-----------------------------cut here-----------------------
NEWSPATH=/where/the/news/articles/are/
export NEWSPATH
EXINIT="map q :q!
map V :s/ .*//
:s.^.view $NEWSPATH.
:s/\./\//g
map K :.w! .rd.$$
:!sh .rd.$$
map g :s/ /. /
map ' VK
ugj"
export EXINIT
readnews -l 2>.tst.$$ | sort .newslist - >.hd.$$ 2>/dev/null
#The next line would go away if another option could
#be used with -l to only update .newsrc.
readnews -p >/dev/null 2>/dev/null &  
mv .hd.$$ .newslist
if [ "No news." = "`cat .tst.$$`" ]
then
  echo "No new news - read old news?(y/n) \c"
  read x
  if [ "$x" = "y" ]
  then
    vi .newslist
  fi
else
  vi .newslist
fi
rm .rd.$$ .tst.$$ 2>/dev/null
-----------------------------cut here-----------------------
DISCLAIMER
It uses vi so if you don't like vi don't use it.
It probably won't work with csh.  I don't know because I use ksh.
Try it - you might like it.
If you don't like it - write your own. (I would be interested in mutants)

Already I have a mutant of my own!!!!!    seek - locate - exterminate
Terry Todd @ ihnp4!ihlpl!tlt