Re:

posted by [identity profile] jbsegal.livejournal.com at 04:26pm on 2004-02-13
Given a line in my .muttrc:
auto_view text/html

and a line in my .mailcap:
text/html; $HOME/bin/h2txt '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html

and a little script in $HOME/bin/h2txt:
#!/bin/sh
# /usr/local/bin/html2text
perl -pe 'BEGIN{$/=">"} s/(
[Error: Irreparable invalid markup ('<img[^<>') in entry. Owner must fix manually. Raw contents below.]

Given a line in my .muttrc:
<pre>auto_view text/html</pre>
and a line in my .mailcap:
<pre>text/html; $HOME/bin/h2txt '%s'; copiousoutput; description=HTML Text; nametemplate=%s.html</pre>
and a little script in $HOME/bin/h2txt:
<pre>
#!/bin/sh
# /usr/local/bin/html2text
perl -pe 'BEGIN{$/=">"} s/(<img[^<>]*)/$1 alt=""/i' "$@" |
lynx -dump -force_html /proc/self/fd/0
</pre>

html mail shows up looking kinda like:
<pre>
[-- Autoview using $HOME/bin/h2txt ''/home/jailbait/.muttmp/mutt.html'' --]

Hi JB,

I was talking with {person} and she mentioned your name as someone
with good security skills. I would like the opportunity to speak with
you about you job status and openings I have that may be a fit for
you.


I look forward to hearing from you.


Regards,

{Other person}
Sr. Staffing Consultant
{Company}
{Phone}
[1]mailto:{email_addr}

References

1. mailto:{email_addr}
</pre>

without having to think about it.
for application/msword in auto_view and a call to catdoc in my .mailcap, I can read word attachments.
And so on.

It is good.

Links

January

SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24
 
25
 
26
 
27
 
28
 
29
 
30
 
31