procmail
[Top] [All Lists]

Re: Identifying HTML email (for conversion)

2003-02-03 16:28:38
Stephen Patterson wrote:
I've recently started receiving a lot of HTML mail from mailing lists,
and I want to rewrite it into plain text so I can read it a lot easier
in mutt.

(Off-topic here: I have

  auto_view text/html

in my .muttrc and

  text/html; lynx -dump -force_html %s ; copiousoutput

in my .mailcap - works fine, even though it doesn't change the
message, of course, and leaves the HTML bloat in.)

This is what I've got at the moment which works fine for
conversion but not identification.  

:0 BH
*  Content-type:.*(text/html|multipart).*

I haven't done any testing, but I don't think you should include
"multipart" there if you're going to use lynx for the conversion. I
can't imagine getting decent results from sending an entire multipart
message to lynx - does that really work for you?

    file = "/tmp/msg.dump"
    LOCKFILE=$file$LOCKEXT
    :0 fbw
    | cat > $file && lynx -dump $file
    LOCKFILE

Isn't your lynx able to read from standard input? That would make the
temporary file and the locking unnecessary.

  :0 fbw
  | lynx -dump -stdin

/HW

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>