Thread View: news.software.readers
1 messages
1 total messages
Started by Bruce Momjian
Sun, 11 Sep 1994 01:33
Script for Tin over NNTP
Author: Bruce Momjian
Date: Sun, 11 Sep 1994 01:33
Date: Sun, 11 Sep 1994 01:33
81 lines
3076 bytes
3076 bytes
I use Tin 1.2PL2 over a 14.4k PPP connection to read news via NNTP. Here are two Unix shell script to make starting up tin easy. They allow you to control which news groups get loaded upon startup. In its default configuration, without flags, tin reads the entire remote active file. This is usually abuot 2000 lines or 150k of data. Over such a connection, startup can be slow. My scripts allow you to control this easily: rtino - runs tin and only loads the groups you subscribe to rtina - load all groups rtinf - loads groups matching the pattern you supply rtinf needs a recent copy of the remote site's active file. The scripts also attempt to prevent you from running tin multiple times on the same .newsrc file. They do nothing tin can not already do, they just make it easier. I have used them for several month, and though they may be of some use to someone. --------------------------------------------------------------------------- #!/bin/sh # # rtino, rtina - save under both names or link them # #set -x BASE=`basename $0` BASE2=$BASE [ "$BASE" = "rtina" ] && BASE2="rtino" trap "rm -f $HOME/.$BASE2.in_use" 0 1 2 3 15 if [ -f $HOME/.$BASE2.in_use ] then echo "Tin is already in use on \c" >&2 cat $HOME/.$BASE2.in_use >&2 trap "" 0 1 2 3 15 exit 1 fi tty > $HOME/.$BASE2.in_use OPT="-f $HOME/.newsrc" [ "$BASE" = rtino ] && OPT="$OPT -qn " # -U [ "$BASE" = rtina ] && BASE=rtin && OPT="$OPT -q" tin -r $OPT "$@" --------------------------------------------------------------------------- #!/bin/sh # # rtinf # the -a option adds groups to your default .newsrc # # # define this as your remote site's active file # NNTPACTIVE=/usr/local/nntp.active # # trap "rm -f $HOME/.newsrcf.$$" 0 1 2 3 15 ADD="N" [ "$1" = "-a" ] && ADD="Y" && shift [ "$#" -ne 1 ] && echo "Usage: $0 [-a] group_pattern" 1>&2 && exit 1 sed 's/^\([^ ]*\).*$/\1: /' $NNTPACTIVE | grep "$1" >$HOME/.newsrcf.$$ shift if [ "$ADD" = "N" ] then tin -r -qn -f $HOME/.newsrcf.$$ "$@" else cat $HOME/.newsrcf.$$ >>$HOME/.newsrc fi -- Bruce Momjian | 830 Blythe Avenue root@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads