[alt.sources] rn macro to decrypt & save

maart@cs.vu.nl (Maarten Litmaath) (01/11/90)

In article <1990Jan7.204009.10925@watcsc.waterloo.edu>
	mkuch@watcsc.waterloo.edu (Murray Kucherawy) writes:
\Can anyone tell me how to store a posting that was posted in
\ROT 13 in its decrypted form? I tried reading it, then reading
\it with CTRL/X (decrypted), and then saving it, but it saves
\it to a file in ROT 13. Please help.

Between the following `cut-here' lines is a macro definition for `*'.  I've
split the macro into 2 lines, because there appear to be mailers which don't
like lines much longer than 80 chars. :-(
When you put the macro into a file called `.rnmac' in the directory in which
your `.newsrc' resides, you must join the 2 lines and delete the `\' at the
end of the first line; `rn' doesn't know about continuation lines. :-(

----------8<----------8<----------8<----------8<----------8<----------
*       %(%m=[ap]?|rot13 >> \
%(%"Decrypt to: [%p/Decrypted] "=^\(..*\)$?%1:%p/Decrypted)^J:*)
----------8<----------8<----------8<----------8<----------8<----------

The `rot13' program is the following shell script, to be put in your PATH.
On a System-V UNIX variant you might want to change the first line to a
single `:'.

----------8<----------8<----------8<----------8<----------8<----------
#!/bin/sh
exec tr '[A-M][N-Z][a-m][n-z]' '[N-Z][A-M][n-z][a-m]'
----------8<----------8<----------8<----------8<----------8<----------
-- 
1755 EST, Dec 14, 1992: Henry Spencer is put on a one-way mission to the moon.|
  Maarten Litmaath @ VU Amsterdam:  maart@cs.vu.nl,  uunet!mcsun!botter!maart