Subject: a2ps title in printing

From: Eric Guilyardi <[email-masked]>
Date: Tue, 9 Oct 2001 15:06:00 +0100 (BST)

Hello,

I am using pine 3.96 and wish to print my emails via a2ps.
I configured the printing set-up with a custom command and
at the moment, the title I get on the document is 'stdin'. 
Is there a way I can send to a2ps another title (like sender's name) ?

Thanks for your help,

Eric

---------------------------------------------------------------------
 Eric Guilyardi               
 CGAM, Dept. of Meteorology                   [email-masked]
 University of Reading             Tel: +44 (0)118 987 5123, ext 7883
 Reading RG6 6BB - UK                        Fax: +44 (0)118 931 8316
 http://www.met.reading.ac.uk/~ericg

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: David Dyck <[email-masked]>
Date: Tue, 9 Oct 2001 09:09:56 -0700 (PDT)

> Is there a way I can send to a2ps another title (like sender's name) ?

Eric,

I pipe my pine printouts through a perl script that collects the subject
like this one, I don't use a2ps, so you'll need to change the
last few line to invoke a2ps with appropiate args, instead of
psnup.  Does this give you and idea?
 David

#!/usr/local/bin/perl

$user = $ENV{'LOGNAME'};
while(<STDIN>) {
    push(@lines, $_);
    if (/^Subject:\s*/) {
	$subject=$';
	chop $subject;
	$subject =~ s/(["`\\\$])/\\$1/g;	# quote all special chars \, ", `, $
	$cmd = "psnup -N -L \"$user\" -C \"$subject\" | lpr -h";
	open(OUT, "|$cmd");
	print OUT @lines, <STDIN>;
	close OUT;
	exit;
    }
}

open(OUT, "|psnup -N -C \"user\" | lpr -h");
print OUT @lines, <STDIN>;
close OUT;

---

From: Eric Guilyardi <[email-masked]>
Date: Tue, 9 Oct 2001 17:43:45 +0100 (BST)

David,

yes it works.

Thanks for your help.

Eric

On Tue, 9 Oct 2001, David Dyck wrote:

|On Tue, 9 Oct 2001, Eric Guilyardi wrote:
|
|> I am using pine 3.96 and wish to print my emails via a2ps.
|> I configured the printing set-up with a custom command and
|> at the moment, the title I get on the document is 'stdin'.
|> Is there a way I can send to a2ps another title (like sender's name) ?
|
|Eric,
|
|I pipe my pine printouts through a perl script that collects the subject
|like this one, I don't use a2ps, so you'll need to change the
|last few line to invoke a2ps with appropiate args, instead of
|psnup.  Does this give you and idea?
| David
|
|#!/usr/local/bin/perl
|
|$user = $ENV{'LOGNAME'};
|while(<STDIN>) {
|    push(@lines, $_);
|    if (/^Subject:\s*/) {
|	$subject=$';
|	chop $subject;
|	$subject =~ s/(["`\\\$])/\\$1/g;	# quote all special chars \, ", `, $
|	$cmd = "psnup -N -L \"$user\" -C \"$subject\" | lpr -h";
|	open(OUT, "|$cmd");
|	print OUT @lines, <STDIN>;
|	close OUT;
|	exit;
|    }
|}
|
|open(OUT, "|psnup -N -C \"user\" | lpr -h");
|print OUT @lines, <STDIN>;
|close OUT;
|
|