From pitkow@cc.gatech.edu Mon Feb 14 15:05:37 1994
Article: 7935 of comp.infosystems.www
From: pitkow@cc.gatech.edu (James Pitkow)
Subject: Your .newsrc to html
Organization: GVU, College of Computing, Georgia Tech
Date: Mon, 14 Feb 94 01:53:11 MET
Hello,
Someone here asked me to write this. It takes your NNTP .newsrc file
and creates an HTML file named [your login name].NEWS.html in your home
directory for the newsgroups that YOU read. It uses grep/sed/awk so it
ought to work on most all unix systems.
Jim.
---------------------------- CUT HERE -------------------------------------
#!/bin/csh -f
############################################################################
#
# Really simple script to takes the newsgroups that you read and creates an
# HTML page call [your login name].NEWS.html for your to use.
#
# Written by: Date:
# James Pitkow February 13, 1994
# Graphics, Visualization, and Usability Center
# Georgia Institute of Technology
# pitkow@cc.gatech.edu
############################################################################
set me = `whoami`
set file = ~$me/$me.NEWS.html
set news = "~$me/.newsrc"
echo "
$me's HTML News Page" > $file
echo "$me's HTML News Page
" >> $file
grep : $news | sed 's/://g' | \
awk '{ print "- " $1 "
"}' \
>> $file
echo "
" >> $file
exit
---------------------------- CUT HERE -------------------------------------
From tkevans@eplrx7.es.dupont.com Fri Apr 1 15:08:35 1994
Article: 11887 of comp.infosystems.www
From: tkevans@eplrx7.es.duPont.com (Tim Evans)
Subject: newsrc2html
Organization: DuPont Engineering Physics Laboratory
Date: Thu, 31 Mar 94 18:19:04 GMT-1:00
This is very short, so I thought I'd just post it. It's a UNIX shell
script which converts your .newsrc to html. If you have modifications,
please send them along.
---------------------------- CUT HERE -------------------------------------
#!/bin/sh
# newsrc2html -- read user's .newsrc and output an html document
# containing links to the newsgroups the user reads; run manually
# or via cron; does not modify .newsrc -- tkevans@dupont.com
# Thu Mar 31 10:25:02 EST 1994
##############################
# parse the user's .newsrc file and output a list of subscribed groups
#
grep -v "!" $HOME/.newsrc | awk -F":" '{print $1}' > /tmp/$$
#
# create skeleton html file, but first backup old one
#
mv -f newsgroups.html newsgroups.html.bak > /dev/null 2>&1
echo "$LOGNAME Newsgroups
$LOGNAME Newsgroups
" > $HOME/newsgroups.html
#
# now that the skeleton is created, add all the newsgroups
#
cat /tmp/$$ | while read group
do echo "$group
" >> $HOME/newsgroups.html
done
echo "" >> $HOME/newsgroups.html
rm -f /tmp/$$
---------------------------- CUT HERE -------------------------------------
--
Tim Evans | E.I. du Pont de Nemours & Co.
tkevans@eplrx7.es.dupont.com | Experimental Station
(302) 695-9353/8638 (FAX) | P.O. Box 80357
EVANSTK AT A1 AT ESVAX | Wilmington, Delaware 19880-0357