procmail
[Top] [All Lists]

Re: converting Html to Plaintext

2005-08-15 14:49:54
  On Aug 15 at 14:35, Hamster spoke:

I have a utility on my machine called html2text. It's provided by the
html2text package (Kubuntu).

Thank you for the recommendation.
I find that html2text doesn't handle (ignore) font directives well.
So I'de be interested in other implementations.

You could use it with the :0 f flag to pipe mail through the utility
and back into procmail for delivery.

I also keep an original copy. 
So my .procmailrc looks like:

:0 c
* <599000
* ^Content-Type: text/html
{
  :0 fbw
  | html2text -style pretty -width 72 

    :0 Afw
    | sed 's/\(Content-Type: text\/\)html/\1plain/'
}

-Hanspeter

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail