From owner-freebsd-questions@FreeBSD.ORG Wed Feb 23 12:15:04 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4CA516A4CE for ; Wed, 23 Feb 2005 12:15:04 +0000 (GMT) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1C5D43D2D for ; Wed, 23 Feb 2005 12:15:03 +0000 (GMT) (envelope-from m.hauber@mchsi.com) Received: from wizard.valleygate.net (12-219-204-24.client.mchsi.com[12.219.204.24]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20050223121502m9200bfiire>; Wed, 23 Feb 2005 12:15:03 +0000 From: Mike Hauber To: freebsd-questions@freebsd.org Date: Wed, 23 Feb 2005 07:18:46 -0500 User-Agent: KMail/1.7.2 References: <200502222316.32866.m.hauber@mchsi.com> <200502230218.37665.m.hauber@mchsi.com> <20050223094316.GA70078@zi025.glhnet.mhn.de> In-Reply-To: <20050223094316.GA70078@zi025.glhnet.mhn.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502230718.47591.m.hauber@mchsi.com> Subject: Re: filtering HTML tags from email X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: m.hauber@mchsi.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 12:15:05 -0000 On Wednesday 23 February 2005 04:43 am, Simon Barner wrote: > > > You could also just pipe it to the following: > > > lynx -localhost -dump -stdin > > > > > > Lou > > > > Okay, so to be sure, there is no filter (as of yet) to simply > > open an email file, strip the HTML tags, and resave it? I'm > > not complaining, as this may actually be something I'm > > capable of creating myself. (I'll make this my first python > > project. :) ) > > > > You probably could do it also with procmail + lynx (or w3m) > during the delivery process. > > Another possibility is to have the following entries in your > ~/.mailcap file, which converts html, doc and rtf to plain > text. > > text/html; w3m -dump -T text/html; copiousoutput; > application/msword; antiword %s; copiousoutput > application/rtf; rtfreader %s; copiousoutput > > Simon Just after destroying the headers in who-knows-how-many emails (backed up... whew!), I finally realized that piping the messages though html2text (or lynx or w3m) was probably not such a great idea after all. :) This is something that really should be implemented as part of kmail itself (it would help to remain compatable with both maildir/mbox). I'll continue to be frustrated with html2text for a while (it's a pretty cool tool), and who knows... Mayhaps I'll figure out a reasonable way to set it up so that everything is done automatically. Thanks for the feeds. Mike