[prev in list] [next in list] [prev in thread] [next in thread]
List: pine-info
Subject: Re: a2ps title in printing
From: Eric Guilyardi <ericg () met ! reading ! ac ! uk>
Date: 2001-10-09 16:43:45
[Download RAW message or body]
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;
|
|
---------------------------------------------------------------------
Eric Guilyardi
CGAM, Dept. of Meteorology ericg@met.reading.ac.uk
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic