<<< Date Index >>>     <<< Thread Index >>>

Re: Converting html tags.



On Tue, Nov 11, 2003 at 03:36:24PM -0600, Greg Kedrovsky wrote:

> One small question: in your mailcap entry below, wouldn't you need to
> use the copiousoutput option in order to autoview the MIME? 

> On Tue, Nov 11, 2003 at 05:57:52PM -0200, Bruno Lustosa wrote:

> > text/html; /usr/bin/lynx -force_html '%s'; needsterminal; description=HTML 
> > Text; nametemplate=%s.html

Yes, Bruno quoted the wrong line ... I'm sure he realized that a bit
too late to cancel his message ;-P  Here are the relevant entries from
my own ~/.mailcap, FWIW:
$ grep -C1 text/html ~/.mailcap
#image/*; /seejpeg %s ; ; ;
#text/html; lynx -child -force_html %s ; needsterminal ; ;
text/html; w3m -T text/html %s ; needsterminal ; ;
#This allows programs (e.g. MUTT) to convert HTML into plain text:
#w3m sucks for printing stuff out:
#text/html; w3m -dump -cols 80 -F -T text/html %s ; copiousoutput
#lynx rocks for this:
text/html; lynx -dump -force-html %s ; copiousoutput
#MP3:

Notice that I don't use an absolute path to lynx, since I like to
let my PATH figure out which lynx to use on a case-by-case basis.
I use the -child option to lynx because it allows me to return to
Mutt by pressing left-arrow (or h, since I have vikeys enabled in my
lynx.cfg).  The description is useful for programs that care about it,
but not necessary.  I don't know what the nametemplate does off-hand,
but everything seems to work 100% fine for me without it ;-)

Also notice that you can use different browsers for the copiousoutput
(inlined) version and the needsterminal (standalone) version of any
given MIME type.  In my case, Mutt inlines the -dump output from lynx,
but if I view-attachment, Mutt will fire up w3m instead (since it's a
much better browser).

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgp7Klfsj0SVY.pgp
Description: PGP signature