procmail
[Top] [All Lists]

Re: Need pointers for HTML --> ASCII conversions

1998-06-20 08:32:30
|Fri 1998-06-19 Bill McClatchie <wmcclatc(_at_)primenet(_dot_)com> list.procmail
| On 19 Jun 1998 jari(_dot_)aalto(_at_)poboxes(_dot_)com wrote:
| > |Fri 1998-06-19 Timothy J Luoma 
<procmail(_at_)Unix(_dot_)luomat+Lists(_dot_)nokia(_dot_)com>
| > | I'm getting a LOT of HTML email now.  99.9999999% of these are
| > | just regular text by people using M$ software that has HTML on
| > | by default.
| > | 
| > | I'm sure someone has written a program script with lynx to
| > | convert HTML to regular ASCII text, but can't find any
| > | references to it
| > 
| > Here is perl one liner:
| > 
| >     perl -0777 -pe 's/<[^>]*>//g'
| > 
| > Can't then who was author of this elegant snippet :-)
| 
| Wouldn't it be eaiser to just snip off the offending html section since
| most of this has a text and an html part to it?  And re-do the mime type
| information.

I assumed that Timothy meant that everything in the message was one html
message. If the case was

    TEXT

    COPY-OF-SAME-TEXT-IN-HTML

Then I can suggest looking at pm-jamime-kill.rc that removes the html 
attachement. (Or any other similar type of attachement, like vcards etc).
Included in pm-code.shar (See X-info).

jari