[net.news.b] recordings in postnews, BSD version

chuqui@nsc.UUCP (Chuq Von Rospach) (04/08/84)

I went and hacked in the recordings patch that was posted by ihuxx!ignatz.
Since that was for the USG version of postnews, some changes had to be
made. Below is a version of postnews that will run on BSD system (and, I
believe, V7). It also includes Prentiss' fix for ignoring distributions
when being fed files. Enjoy!

chuq


-postnews -

#! /bin/sh
: '@(#)postnews.v7	2.8	4/23/83'
:
: 'modified 12/8/83 by Prentiss Riddle (riddle@ut-sally.UUCP) not to '
: '    ignore a Distribution specification when invoked with a       '
: '    filename argument.                                            '
:
: 'modified 4/7/84 by chuq von rospach (nsc!chuqui) to print out '
: 'recordings where appropriate. Based on version posted for usg by'
: 'nwuxd!dbaker'
:
: postnews: version 1.4 of 4/7/84
: 
: '@(#)postnews	1.4 (NSC) 4/7/84'
_NEWSLIB=/usr/lib/news
if test $# -gt 1 ; then
	/bin/echo "$0: Too many args"
	exit 1
fi
if test $# -eq 1 -a ! -r "$1" ; then
	/bin/echo "$0: Can't read $1"
	exit 1
fi
/bin/echo -n "Subject: "
read title
/bin/echo -n "Newsgroups (general): "
read ng
if test x$ng = x ; then
	ng=general
fi
: play recorded message
if test -s ${_NEWSLIB}/recording ; then
_rec1=${_NEWSLIB}/`cat -s ${_NEWSLIB}/recording|grep $ng|sed "s/^.*	//"` 
_tmp=`echo $ng |sed "s/\..*//"`
_rec2=${_NEWSLIB}/`cat -s ${_NEWSLIB}/recording|grep ${_tmp}.all|sed "s/^.*	//"`
fi
if test -f ${_rec1} ; then
cat -s ${_rec1}
fi
if test -f ${_rec2} ; then
cat -s ${_rec2}
fi
/bin/echo -n "Distribution ($ng): "
read dist
if test x$dist = x; then
	dist=$ng
fi
t=/tmp/pn$$
trap "sleep 1; cp $t $HOME/dead.article ; echo saved in $HOME/dead.article ; rm -f $t; exit" 1
trap "" 2
/bin/echo "Subject: $title" > $t
/bin/echo "Newsgroups: $ng" >> $t
if test $dist != $ng; then
	/bin/echo "Distribution: $dist" >> $t
fi
/bin/echo "" >> $t
case $# in
0)
	${EDITOR-vi} $t
	cd /tmp
	if inews -h <$t
	then
		:
	else
		if cat $t >>$HOME/dead.article
		then
			/bin/echo Article saved in $HOME/dead.article
		fi
	fi
	;;
1)
	cat $1 >>$t
	cd /tmp
	inews -h < $t
	;;
esac
sleep 1
rm -f $t

-- 
From under the bar at Callahan's:		Chuq Von Rospach
{amd70,fortune,hplabs,menlo70}!nsc!chuqui	(408) 733-2600 x242

A toast! To absent friends... {clink}

joe@fluke.UUCP (Joe Kelsey) (04/09/84)

Newsgroups: net.news.b
Subject: Re: recordings in postnews, BSD version
References: <828@nsc.UUCP>

What is all this bruhaha (hah-hah-hah) about recordinge in postnews?
Inews is responsible for sending out recordings, unless you have some
other version of inews which doesn't play the recordings, or you have
broken the recording code in inews somehow.  As far as I can tell,
postnews was never supposed to play the recording.  The recording
should be played AFTER composing the message, but BEFORE you send it,
which is EXACTLY what inews does!  If you happen to have placed the
recording file incorrectly so that inews can't find it, then maybe you
should fix the original problem rather than fixing a problem that
wasn't there in the first place!

/Joe

chuqui@nsc.UUCP (Chuq Von Rospach) (04/11/84)

The big problem with recordings in inews is that it doesn't work with
vnews and nicely garbages the h*ll out of the screen. Besides, since 99+%
of the original messages tend to go out through postnews, that is where I
want recordings. I see no sense in telling people while they are following
up to someone what the topic is about. It is the new messages that need the
reminders (this might now be as true for something like net.all reminding
people about proprietary information as some Bell sites do, but that isn't
a problem here). I made the following assumptions:
	-  I don't need recordings in readnews or vnews
	-  Everyone uses postnews to post new articles 
	-  That is where recordings are needed
	-  People smart enough to write their own replacements for postnews
	   are smart enough that they don't need constant reminders on how
	   to use the net.

Inews is a big enough hack as it is, and already does way to much for its
own good (this is why I am hacking bnproc into it as well, of course).
Anything I can do to clean it up a bit is well worth while.

chuq

-- 
From under the bar at Callahan's:		Chuq Von Rospach
{amd70,fortune,hplabs,menlo70}!nsc!chuqui	(408) 733-2600 x242

A toast! To absent friends... {clink}

joe@fluke.UUCP (Joe Kelsey) (04/16/84)

> The big problem with recordings in inews is that it doesn't work with
> vnews and nicely garbages the h*ll out of the screen. 

So fix vnews so that it does work!  I claim that you are trying to fix
something (postnews) that isn't broken!

> Besides, since 99+%
> of the original messages tend to go out through postnews, that is where I
> want recordings. 

If 99+% of the messages go through postnews, then they also go through
inews, since postnews calls inews.  So the recordings are already there!

> I see no sense in telling people while they are following
> up to someone what the topic is about. It is the new messages that need the
> reminders (this might now be as true for something like net.all reminding
> people about proprietary information as some Bell sites do, but that isn't
> a problem here). 

I don't understand this at all!  What are you talking about?

> I made the following assumptions:
> 	-  I don't need recordings in readnews or vnews

So fix readnews or vnews!

> 	-  Everyone uses postnews to post new articles 
> 	-  That is where recordings are needed

That is where recordings already are!

> 	-  People smart enough to write their own replacements for postnews
> 	   are smart enough that they don't need constant reminders on how
> 	   to use the net.

Such people should also be smart enough to figure out how to prevent
inews from playing the recording.

My main point still holds:  If readnews or vnews is broken (or if you
perceive a missing feature) FIX WHAT IS BROKEN!  Postnews is not
broken!  It doesn't need to be fixed!  If you want to claim that you
have a combination of changes to postnews and rnews/inews which moves
the playing of recordings from inews to postnews, I suppose that I
could accept that, but that is NOT fixing something that is broken.  It
is changing the functionality/adding new functionality.

BTW, if anyone wants to know how to stop inews from playing the
recording, use the undocumented -D flag to inews.  This flag is not for
user consumption and should only be used by softwear which calls inews
in a controlled environment.

/Joe

chuqui@nsc.UUCP (Chuq Von Rospach) (04/19/84)

>> The big problem with recordings in inews is that it doesn't work with
>> vnews and nicely garbages the h*ll out of the screen. 
>
>So fix vnews so that it does work!  I claim that you are trying to fix
>something (postnews) that isn't broken!

It all depends on your philosophy. To fix inews to run recordings properly
would mean to teach it screen handling ala curses. Inews is already a large
and complicated beastie that I am trying to get smaller and less
complicated. I feel that the job of informing users of things like
recordings should be done by the programs that interact with the users.
Inews is supposed to be the program that does the database access, and it
should do only that job. Working with the users should be left to the front
ends.

>> Besides, since 99+%
>> of the original messages tend to go out through postnews, that is where I
>> want recordings. 
>
>If 99+% of the messages go through postnews, then they also go through
>inews, since postnews calls inews.  So the recordings are already there!

See my previous remarks about what inews should be doing and what it shouldn't.

>> I see no sense in telling people while they are following
>> up to someone what the topic is about. It is the new messages that need the
>> reminders (this might now be as true for something like net.all reminding
>> people about proprietary information as some Bell sites do, but that isn't
>> a problem here). 
>
>I don't understand this at all!  What are you talking about?

I wasn't clear. The person who is following up a message is not choosing
the topics that his followup is being sent to. They are sent to the topics
that the original message was in. Since he is not deciding where to send
his message, asking him if he is using the proper topics is silly. The
special case where someone changes topics on a followup is usually done by
people who know what they are doing, and I don't feel like they need to be
babysat anyway. AT&T uses recordings to remind their people not to discuss
proprietary information. This case is not handled by ignoring recordings in
readnews and vnews, but I feel that this is excessive babysitting and so I
don't miss it. (AT&T may think differently, of course)

>> I made the following assumptions:
>> 	-  I don't need recordings in readnews or vnews
>
>So fix readnews or vnews!

If recordings are in inews, I can fix  readnews and vnews all week and
inews will still take over the terminal and write things on it. I would
much rather fix inews by removing the recordings and put them where they
belong, which is in the program that does the user interface.

>> 	-  People smart enough to write their own replacements for postnews
>> 	   are smart enough that they don't need constant reminders on how
>> 	   to use the net.
>
>Such people should also be smart enough to figure out how to prevent
>inews from playing the recording.

I am sure they are. The point is, inews shouldn't be doing this in the
first place. I think I am getting repetitive on this point, but my 
philosophy is that a program should do one thing well. Inews was not
designed to do user interface stuff (read the man page) and having it do
recordings causes it to interface in one isolated way. Unless you are
willing to teach inews how to do this for each possible interface, it will
not do it right in all cases. My solution is to try to steer inews back to
what it was supposed to be, which is a back end, and let the front ends do
what they are supposed to do, which is work with the user and keep them
informed.

>My main point still holds:  If readnews or vnews is broken (or if you
>perceive a missing feature) FIX WHAT IS BROKEN!  Postnews is not
>broken!  It doesn't need to be fixed!  If you want to claim that you
>have a combination of changes to postnews and rnews/inews which moves
>the playing of recordings from inews to postnews, I suppose that I
>could accept that, but that is NOT fixing something that is broken.  It
>is changing the functionality/adding new functionality.

I did fix what was broken. Inews was broken because it was doing something
it wasn't supposed to do - recordings. Postnews, which should have done
recordings, didn't. readnews and vnews, which don't do recordings, still
don't because I don't feel they have to. 

I think what we have here is a philosophical difference of opinion on the
lines of cat -v. I don't plan on beating it into the ground any further
unless interesting new points come up, because if you agree with me I don't
need to convince you, and if you disagree I'll probably never change you
mind. Either way screaming at each other will simply make life miserable
for everyone...

chuq

-- 
From under the bar at Callahan's:		Chuq Von Rospach
{amd70,fortune,hplabs,menlo70}!nsc!chuqui	(408) 733-2600 x242

Never give your heart to a stranger, unless you are sure that you are dead.