|
August 2004
Shell Corner: analyze-postings — A Shell Script to Analyze Netnews Postings
Hosted by Ed Schaefer
analyze-postings
by Dave Taylor
Listing 1: analyse-nttp.sh
As an instructor for the University of Phoenix Online, I not only work with Netnews groups for my personal interests, but professionally, too. While itęs not hard to find a Netnews reader (most email programs seem to include NNTP compatibility nowadays), itęs not very easy to do any sort of analysis of news postings, which is exactly what I need to do for my classes.
I need to be able to calculate two things: total number of postings in a given period of time, and number of days during that period that there were postings. For example, if we talked about the first week of September, thatęs a 7-day period, during which time a given student could post an arbitrary number of articles on any of 0-7 days.
Half the Solution with "suck"
The first part of my solution utilizes a nifty, albeit somewhat old, open source application with the melodious name of ęsuckę. You can find this application at http://www.sucknews.org/. It's easy and quick to download, configure, and install. Use the README file to get started.
Once installed, I had to figure out how to get the application to download postings but not save them on the disk since it was the data stream I wanted to analyze, not save (the postings are saved on the server). After some experimentation, I figured out that I could specify the account name, password, and server name:
suck nntp.sampleu.edu -U taylor -P 'myPassWord' ęg
The "-g" flag forces suck to only download headers, which saves oodles of time.
|