🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #12728

Re: The trn newsreader FAQs -- updates

#12728
From: Wayne Davison
Date: Sun, 13 Nov 1994 23:11
175 lines
6930 bytes
[I tried mailing this to pjkappes@mailbox.syr.edu and pjkappes@syr.edu,
but both attempts bounced back (the former with a 550 Host unknown
error for host "pjkappes@mailbgx.syr.edu" (note the 'g') and the latter
with a "User unknown" error.]

Hi Peter!  Nice to see you grabbed the ball and ran with it on the trn FAQ!
Much appreciated, and a nice job!

Here are some comments on various bits of the FAQ that might need to be
tweaked:

FYI:
> Distribution: world

Isn't really a distribution.  The suggested way to get unrestricted
distribution is to leave the line empty and have it automatically
removed.

In the nn/trn comparison, some of the items are either outdated or based
on a trn that didn't have a database:

> NN 6.4.16
> =========
> + faster auto killing/selecting

Like this one -- I don't believe that nn is any faster at auto-killing
than trn.

> + can split/unsplit digests

If you are running the NOV-compatible version of nn this doesn't work,
so you might want to note that.

> + can easily mail a copy of a followup article to the author you're
>   responding to

Trn 3.x has the Cc: line for this -- simple.

> + can easily mail articles you read/post to other addresses

Using Ctrl-F to forward an article in trn is easy as well.  This was
added in 3.5 or 3.4.1 -- I forget.

> + can have spell check one of the options before posting/mailing article

Trn 3.x has this -- use 'c'heck or "sp"ell at the appropriate prompt in
Pnews.

> + can set default save directory for each newsgroup that is not necessarily
>   one of the interpreted strings (e.g., my default save dir for comp.editors
>   is +vi)

This requires some environment variable tweaking in the memorized commands
for the group:

&-ESAVEDIR=%p/custom_dir
X&-ESAVEDIR=%p

The first line is executed on entry to the group, setting the default
save directory to ~/News/custom_dir.  The second line is executed on
group exit and sets the save directory back to ~/News.

> >>>>> Answer From: <mmcleod@clark.net> (Mark McLeod)
> 
>     You can use the ".trninit" file, which is documented in the
> on-line manual (`man trn').  You also will need to set an environment
> variable (I believe that it is $TRNINIT) to point to that

He believes correctly.  I don't know if you want to edit out the "I
believe that it is" part to be more definite or not.

> >>>>> Answer From: <davison@borland.com> (Wayne Davison)
> 
> The best thing to do is to put it in your .trnint file (and point the

Whoops -- my fingers must have slipped -- that should be .trninit.

> TRNINIT environment variable at the file if you haven't already done
> so).  Then, just copy the lines out of the HINTS.TRN file (included
> in trn 3.5) for the default value of NEWSHEADER and modify it as you
> desire.

This bit is specific to the NEWSHEADER definition and the question is
generic for all multi-line headers.  You could change this to be:

Then, use the default definition as mentioned in the man page (or
copy it out of the common.h source file, if you have access to it),
and twek the value as you desire.  Note that the HINTS.TRN file has
the .trninit version of the NEWSHEADER definition in it, for your
edification.

> >>>>> Answer From: <perry@jpunix.com> (John A. Perry)
> 
> Another way to do it would be to add an entry to set the FAST_PNEWS 
> variable in your .trninit file.

For a small site it also works to put "-EFAST_PNEWS=y" in the INIT
file for the entire site.  I suggest not doing this for a large site,
as the extra questions might help a new user understand where their
postings are going.

> Subject: 20. Is there an easy way to save different threads
>              to different files?
> Question-From: <neklan@euclid.mlnet.com> (Neklan)

Trn 3.6 has a single-thread command similar to ":cmd" that will make
this easy.  I'll let you know the exact syntax once 3.6 is released.

> >>>>>   Answer From: <davison@borland.com> (Wayne Davison)
> 
> Yeah, this is a drag over a slip line.  Version 3.6 will provide
> support for the new line-at-a-time active file listing that will
> be in nntp-t6 and inn 1.5, so as long as you're at a site that

Nntp-t6 is about to be released as nntp-1.5.12, so just substitute
the one name for the other in this line.

> Run the "trnkill" script included below from cron and it will enter
> every subscribed group you have just long enough to run the kill file,
> and then exit.

My latest version (which is included in trn 3.6 in the support dir)
is as follows:

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
#!/bin/sh
# trnkill - shell script to apply trn KILL files in the background
# 14 Mar 89  created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU>
# 10 Sep 93  modified for trn 3 (or 2) by Wayne Davison <davison@borland.com>
# Options: -d	debug mode -- you see all gory action as it happens.

# Visit all newsgroups (if trn asks about anything else, just say no)
export TRNINIT TRNMACRO RNMACRO
TRNINIT='-q -s -T -t -x +X'
TRNMACRO=/tmp/trnkill$$
# support for trn 2.x
RNMACRO=$TRNMACRO
trap 'rm -f $TRNMACRO; exit' 1 2 3 15
cat >$TRNMACRO <<'EOF'
z  %(%m=[nf]?.q^J:n)^(z^)
^m ^(z^)
^j ^(z^)
EOF
if test X$1 = X-d; then
	echo "z" | trn
else
	echo "z" | trn >/dev/null 2>&1
fi
rm -f $TRNMACRO
exit 0
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---

>From the 2nd part of the FAQ:

> >>>>> Note from Peter J. Kappesser <pjkappes@mailbox.syr.edu>:
> 
> I tried this script, but it refuses to run as a cron job, complaining it
> 'Can't open /dev/tty'.

Another similar question is:

I tried this script, but trn crashes when run as a cron job.

Answer:

This is a problem with no terminal being set in the cron-run environment,
which is confusing trn.  Trn 3.6 fixes this problem by assuming that if
you don't have TERM set in your environment that your terminal is "dumb".
Add the lines "TERM=dumb" and "export TERM" to your trnkill script to
get this to work with older trns.

Thanks again for maintaining this FAQ!
-- 
Wayne Davison
davison@borland.com
Technical Details
Message-ID: <Cz8B2p.JMz@borland.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.alpha.net!uwm.edu!spool.mu.edu!agate!darkstar.UCSC.EDU!news.hal.COM!decwrl!borland.com!davison
References: <trn-faq-1-784723602@kong.syr.edu>

Show Full Headers
Complete Article Headers
Message-ID: <Cz8B2p.JMz@borland.com>
Subject: Re: The trn newsreader FAQs -- updates
Date: Sun, 13 Nov 1994 23:11:12 GMT
From: davison@borland.com (Wayne Davison)
References: <trn-faq-1-784723602@kong.syr.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!raffles.technet.sg!piaget.moe.ac.sg!usenet.eel.ufl.edu!news.mathworks.com!news.alpha.net!uwm.edu!spool.mu.edu!agate!darkstar.UCSC.EDU!news.hal.COM!decwrl!borland.com!davison
Newsgroups: news.software.readers
Organization: Borland International
Lines: 175