🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
2 messages
2 total messages Started by Thomas N. Mackey Mon, 09 May 1994 19:23
TRN: auto compression, encryption?
#8954
Author: Thomas N. Mackey
Date: Mon, 09 May 1994 19:23
24 lines
1701 bytes
Forgive me if this has been covered before -- nothing in the ~200 articles
still on my system.

I would like trn to look at the filename I am saving an article into, see
if such filename.Z exists, and if so, uncompress the original file, append
the article, and then run compress on the file.  If no filename.Z exists,
save the article into the given filename and then compress it.  This could
be based on environmental variables COMPRESS_EXT and COMPRESS_PGM, I suppose,
to support different compression utilities.

Has anyone already done this, either as a patch, or as a funky "save script?"

As another point of interest, how about automatic encryption in a manner
similar to the compression outlined above?  Seems reasonable, but I have
no particular interest in reinventing if someone has already done one or
both of these nifties and is willing to share their handiwork with other
usenetters...


--
    Character is like a fence: it can't be strengthened with whitewash.

	Thomas N. Mackey    (Tom)     tomm@halcyon.com
   
Re: TRN: auto compression, encryption?
#8968
Author: Wayne Davison
Date: Tue, 10 May 1994 20:59
26 lines
1566 bytes
According to Thomas N. Mackey <tomm@halcyon.halcyon.com>:
> I would like trn to look at the filename I am saving an article into, see
> if such filename.Z exists, and if so, uncompress the original file, append
> the article, and then run compress on the file.

You need to modify the "norm.saver" script.  You can create your own
version and set the NORMSAVER environment variable to reference it (see
the -E option to set it via your .trninit file).

The file should contain enough information for you to tweak it if you're
familiar with shell programming.  If you're not, try something like the
following (untested):

if test -f $7.Z; then
	uncompress $7
	recomp="compress $7"
else
	recomp=''
fi
[The existing (...sub shell stuff...) >> $7 goes here]
if test -n "$recomp"; then
	eval $recomp
fi
-- 
Wayne Davison
davison@borland.com
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