[news.software.b] Transfer selected articles to remote news hierarchy

rmr@cci632.UUCP (Ralph Russo) (02/20/90)

I have access to a full set of newsgroups at work but, alas, my system
at home receives only a small handfull of groups.  The following minor
tweaks allow me to transfer selected articles from work to home for
installation into my home news hierarchy.

This little hack modifies the "Save article" function of rn to save
articles as a news batch.  The batch can then be manually fed to rnews
on another system for installation into the target machine's news
system.

It requires no modification to either machine's news software.

WARNING: Make the required changes to the target machine's sys file
unless you want this stuff unnecessarily forwarded...

Put the following lines in your environment:

> RNINIT='-N'
> NORMSAVER='~/bin/batch.saver %A %P %c %a %B	%C "%b"'
             ^^^^^^^^^^^^^^^^^
             Customize this path!

Install this simple script into ~/bin/batch.saver (or wherever):

> #!/bin/sh
> # 
> #	Arguments:
> #	1 Full name of article (%A)
> #	2 Public news spool directory (%P)
> #	3 Directory of current newsgroup (%c)
> #	4 Article number (%a)
> #	5 Where in article to start (%B)
> #	6 Newsgroup name (%C)
> #	7 Save destination (%b)
>   
> export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
> 
> BYTES=`ls -l $1 | awk '{print $5}'`
> 
> 
> ( echo "#! rnews ${BYTES}"
>   cat $1 ) >> $7
> 

When reading news with rn, the "s" function will create news batches
in $HOME/News/... These batches are ready for piping into rnews on the
target machine.

Ralph Russo