Thread View: news.software.readers
3 messages
3 total messages
Started by Ren� Scholz
Fri, 06 Mar 1998 00:00
new postpgp.pl
Author: Ren� Scholz
Date: Fri, 06 Mar 1998 00:00
Date: Fri, 06 Mar 1998 00:00
94 lines
3117 bytes
3117 bytes
-----BEGIN PGP SIGNED MESSAGE-----
hi,
I got my hands of the postpgp script and simplified it a bit.
Here is it (used on this article too).
Am I right, that the sed-call is absolute unnecessary because of
s/^\./_./ ? Don't know why it was there in the previous diff.
I you wish, I can also eleminate the cat-call, but that would make the code
a bit longer.
Comments wanted:
#!/usr/local/bin/perl
# [postpgp.pl] v. 2.0
#
# written by jason steiner, jsteiner@anwsun.phya.utoledo.edu, Jan 1993
#
# if you use or make improvements to this program i would appreciate
# copies of your modifications & your PGP public key.
#
# [06.03.1998] modified by Ren� Scholz <mrz@informatik.uni-jena.de>
$HANDLE_POINTS=0; # if 1: change . to _. (for inews)
($visual=$ENV{'EDITOR'}) || ($visual="/usr/local/bin/jed");
$name=$ARGV[$#ARGV]; # name of edited file in /tmp (or so)
system($visual,@ARGV); # create posting with editor
print "Sign this message? [yN]: "; chomp($_=<STDIN>);
if(lc($_) eq "y")
{
push(@opts, '-st', '+clearsig=on');
&sign_message();
}
sub sign_message
{
if(@opts)
{
open(INPUT,$name);
open(HEAD,">$name.head");
open(BODY,">$name.body");
while (<INPUT>)
{
if (1 .. /^$/) { print HEAD; }
else
{
s/^\./_./ if($HANDLE_POINTS);
print BODY;
}
}
close(HEAD);
close(BODY);
rename "$name.body2", "$name.body";
system('pgp', '-a', @opts, "$name.body");
system "cat $name.head $name.body.asc > $name";
unlink("$name.head", "$name.body", "$name.body.asc");
}
}
ren�
- --
"Wer die Freiheit aufgibt, um Sicherheit zu gewinnen,
der wird am Ende beides verlieren" (Benjamin Franklin)
==> Voland @IRC <== 2048/0xF11D6871 2A8D 3F92 4EB8 E55C 3605 D571 38C8 E2B8
mrz@informatik.uni-jena.de http://www2.informatik.uni-jena.de/~mrz/
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in
Charset: latin1
iQEVAwUBNQB27scWjdvxHWhxAQGamQf/XUrqXxHblWDLx392+76KHUFJYnMauYLe
N/J8TmBOKeYsKjUNTIMEaWmrtA0//aWkaB7SZP7rYWYJ9KKzZlwNtgHepCiUeS3g
Qps/W/A0Pfg4/JcDGObXOP034QXQ/G6dEYAbyNxAc85TS0f7bP9/z/+BvaGKxCKR
nD2HlCpFDLAmaAl1HMnXgJB9lNjHJu34DRJ5VIDvQ3+Q3JZxBzYgs5GKWGfg1fVf
BmF6hDqI5YEbjLM13QyFQvIxzy4FC/7q97Y8ZrYwnVXssc2gzrhy/wcrCdFyC6Bo
fnrAoB3NHjxCUXldY7x6XRwBz6VXEh843oG5vwKWHQqqLokvfa7xSQ==
=7sf7
-----END PGP SIGNATURE-----
Re: new postpgp.pl
Author: Ren� Scholz
Date: Sat, 07 Mar 1998 00:00
Date: Sat, 07 Mar 1998 00:00
24 lines
1523 bytes
1523 bytes
Fluffy <fluffy@meow.org> wrote:
>I posted a later version with the substitution done in perl. The sed was just
>there because I'm seriously lazy about these things.
;)
>
>: ($visual=$ENV{'EDITOR'}) || ($visual="/usr/local/bin/jed");
>Muct better =) That VISUALBAK was just weird.
Doesnt' even know it :)
>: rename "$name.body2", "$name.body";
>Shouldn't be necessary nay more without the sed junk.
So I forget something too ;)
ren�
--
"Wer die Freiheit aufgibt, um Sicherheit zu gewinnen,
der wird am Ende beides verlieren" (Benjamin Franklin)
==> Voland @IRC <== 2048/0xF11D6871 2A8D 3F92 4EB8 E55C 3605 D571 38C8 E2B8
mrz@informatik.uni-jena.de http://www2.informatik.uni-jena.de/~mrz/
Re: new postpgp.pl
Author: Fluffy
Date: Sat, 07 Mar 1998 00:00
Date: Sat, 07 Mar 1998 00:00
30 lines
1591 bytes
1591 bytes
Ren� Scholz <mrz@isun32.inf.uni-jena.de> wrote:
: I got my hands of the postpgp script and simplified it a bit.
Nifty!
: Here is it (used on this article too).
: Am I right, that the sed-call is absolute unnecessary because of
: s/^\./_./ ? Don't know why it was there in the previous diff.
I posted a later version with the substitution done in perl. The sed was just
there because I'm seriously lazy about these things.
: I you wish, I can also eleminate the cat-call, but that would make the code
: a bit longer.
Yup, and I doubt it would gain much. It is an interactive script, after all
=)
: ($visual=$ENV{'EDITOR'}) || ($visual="/usr/local/bin/jed");
Muct better =) That VISUALBAK was just weird.
: rename "$name.body2", "$name.body";
Shouldn't be necessary nay more without the sed junk.
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