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

Re: X-Face viewing and creation



* Trey Sizemore on Friday, September 07, 2007 at 19:25:49 -0400
> On Sat Sep 08, 2007 12:03AM, Christoph Berg wrote:
>> Re: Trey Sizemore 2007-09-07 <20070907211451.GA30293@valkyrie>
>>> Can someone point me to a good reference on being able to view X-Face
>>> headers in mutt as well as adding them to outgoing mails (preferably
>>> color)?
>> 
>> http://www.df7cb.de/projects/mutt/x-face/
>> 
>> No idea about color, I think that's some other header. (X-Image?)
> 
> Yes, as a previous responder mentioned, I should have said 'Face'
> header vs. 'X-Face' header.
> 
> So any info about using and viewing 'Face' headers with mutt is
> greatly appreciated.

I tweaked Christoph's procmail filter from above link to display
both X-Face and Face headers (thanks Christoph!):


# filter procmailrc to display (X-)Face images with VIEWER
# (c) 2004 Christoph Berg, GNU GPL.
# tweaked by Christian Ebert

# customize X11 viewer (has to accept stdin)
VIEWER="/usr/local/bin/xli -fork stdin"

PRINTF="/usr/bin/printf"
UNCOMPFACE="/usr/local/bin/uncompface"
RECODE="/usr/local/bin/recode"
FORMAIL="/usr/local/bin/formail"
TR="/usr/bin/tr"

:0
* DISPLAY ?? .
{
        :0
        * ^X-Face: *\/.................*
        {
                :0c
                | $PRINTF '%s' $MATCH | $UNCOMPFACE -X | $VIEWER
                :0fhw
                | $FORMAIL -f -I 'X-Face:'
        }

        :0
        * ^Face: *\/................*
        {
                :0c
                | $PRINTF '%s' $MATCH | $TR -d ' ' \
                | $RECODE -f /base64 | $VIEWER
                :0fhw
                | $FORMAIL -f -I 'Face:'
        }
}

:0
|

# EOF vim:ft=procmail


Note:
For some messages I have to recirect stderr to /dev/null:
set display_filter="procmail -pm x-face.procmailrc 2> /dev/null"

c
-- 
Python Mutt utilities <http://www.blacktrash.org/hg/muttils/>