<<< Date Index >>>     <<< Thread Index >>>

Re: accessing filename in .muttrc



On 06/11/03 16.41, research@xxxxxxxxxxxxxxxx wrote:
> Hi,
> 
> thanks for your reply to the mutt-users list re: my question.

You're welcome.

> I am a bit confused about your reply and was wondering if I
> could trouble you to clarify it for me ?

Sure.

> How exactly would the script you mention below be activated ?
> 
> How does it fit in with .muttrc or, would I need to use it
> with mutt-printing ?

I would put it as print_command in .muttrc:

 set print_command="~/bin/printscript"

Looking a bit more at your original question you would have
'printscript' looking  something like:

 #!/bin/bash
 umask 0077
 cat > /tmp/printing-mail-$$.tmp
 subject=`cat /tmp/printing-mail-$$.tmp|formail -x Subject:|tr ' ' '_'`
 cat /tmp/printing-mail-$$.tmp | a2ps -o - -1gEmail --borders=no --strip=3 | 
ps2pdf - $HOME/Maildir/mail-output-$subject.pdf
 rm /tmp/printing-mail-$$.tmp 

For this to work right, you would also need to set print_split in
.muttrc, so the script is called once for every mail printed, if you
happen to print multiple messages by tagging them.
 
> My apologies in advance if you find this question tedious.

Not at all, it actually helps me get good ideas for a printing setup
for mutt. I haven't have time to get all the details down, but this
helps me get the pieces together in my head. I'll put something on the
web, once I have it down in script.

> thanks,

You're welcome.

/dossen

PS: There is still a need for lots of error-handling and other bells
    and whistles.

PPS: I'd like it if you not put me in Cc:, I get my copy from the
     list, and while I guess you did it with good intentions, it
     causes me more problems than it helps me.

Attachment: pgpudu5Xto3en.pgp
Description: PGP signature