🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #5283

script hack to make nn behave "correctlly" for saved digests (enclosed)

#5283
From: John Vanderpool
Date: Wed, 12 Jan 1994 19:32
50 lines
2573 bytes
since no one found a solution to the nn "feature" that makes it so you can't read
digests that you have saved either via elm or nn itself (there is more of a description
of the problem itself in the comments below)

here is a little unix shell script I whipped up to circumvent it - maybe it will
be useful to somebody else: (tell me if i'm crazy!)		-fish

#!/bin/sh
#
#	fnn - fake nn into reading digests that it normally won't (but should)
#
# 10-jan-1994 jrv initial release (John_Vanderpool@gsfc.nasa.gov)
#
# NOTES: either saving a digest from a mailer like elm OR from nn itself (w/
#	 mail-format true) creates this problem.  It all boils down to one simple
#	 (unfortunate) difference - for some reason when nn sees a header like this:
#
#		From foo@bar.com Tue Aug 31 17:44:12 1993
#
#	 it won't undigestify, only because of the seconds in hh:mm:ss ! if the hdr is:
#
#		From foo@bar.com Tue Aug 31 17:44 1993
#
#	it works fine.  So... I created this script to fool it, would be nice if it
#	could get fixed in the nn source (w/ ability to undigestify inside folders!)

if [ "${1:-}" = "" ]; then
  echo "usage: `basename $0` file"
  exit 1
fi

file=$1
tmpfile=${TMPDIR:-/tmp}/`basename $file`.tmp

(				# begin data encapsulation via sub-shell
cat <<EOF
From: NN digest faker
Subject: NN digest faker
EOF
cat $file
) > $tmpfile
/usr/local/bin/nn $tmpfile

if [ -f $tmpfile ]; then /bin/rm -f $tmpfile; fi

--
John R. Vanderpool     INTERNET: fish@daac.gsfc.nasa.gov

Well she's walking, through the clouds, with a circus smile thats running 'round
Butterflies and zebras, and fairytales, that's all she ever thinks about... jh
Technical Details
Message-ID: <fish.758403139@news.gsfc.nasa.gov>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!xlink.net!zib-berlin.de!math.fu-berlin.de!umn.edu!news-feed-1.peachnet.edu!emory!europa.eng.gtefsd.com!paladin.american.edu!zombie.ncsc.mil!cs.umd.edu!skates.gsfc.nasa.gov!news.gsfc.nasa.gov!fish

Show Full Headers
Complete Article Headers
Message-ID: <fish.758403139@news.gsfc.nasa.gov>
Subject: script hack to make nn behave "correctlly" for saved digests (enclosed)
Date: Wed, 12 Jan 1994 19:32:19 +0000
From: fish@daacdev1.stx.com (John Vanderpool)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!xlink.net!zib-berlin.de!math.fu-berlin.de!umn.edu!news-feed-1.peachnet.edu!emory!europa.eng.gtefsd.com!paladin.american.edu!zombie.ncsc.mil!cs.umd.edu!skates.gsfc.nasa.gov!news.gsfc.nasa.gov!fish
Newsgroups: news.software.nn
Organization: NASA Goddard Space Flight Center -- InterNetNews site
Lines: 50
NNTP-Posting-Host: daacdev1.stx.com
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit