Re: [dev] Stripping html from email

From: Benjamin R. Haskell <suckless_AT_benizi.com>
Date: Tue, 24 Aug 2010 00:36:14 -0400 (EDT)

On Mon, 23 Aug 2010, Suraj Kurapati wrote:

> On Mon, Aug 23, 2010 at 8:46 PM, Anthony J. Bentley wrote:
> >> Is there currently a tool or script that I can use to strip html
> >> from emails?
> >
> > mhshow-show-text/html: lynx -dump %F | less
> >
> > Lynx sucks but it sorta works well enough here, I guess.
>
> I find that w3m does a much better job of HTML to plain-text
> conversion than Lynx. It even renders HTML tables using Unicode
> box-drawing characters!
>
> http://w3m.sourceforge.net/
>

Wow. Thanks for that. I've always preferred 'links' to 'lynx', but
'w3m' just dethroned it.

For the crappy HTML emails I deal with at work that assume everyone uses
HTML-based email, I had to add an explicit type:

w3m -dump -T text/html

-- 
Best,
Ben
Received on Tue Aug 24 2010 - 06:36:14 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 24 2010 - 06:48:02 CEST