From: Bill White <billw@wolfram.com>
Subject: Re: htmlified mail
Date: 24 Jan 2001 05:38:53 -0600 [thread overview]
Message-ID: <ruo66j5qiwi.fsf@g.wolfram.com> (raw)
In-Reply-To: <k0n4rypcnur.fsf@metropolis.phys.ntnu.no> (Joakim Hove's message of "24 Jan 2001 10:15:40 +0100")
On Wed Jan 24 2001 at 03:15, Joakim Hove <Joakim.Hove@phys.ntnu.no> said:
jh> I quite often get htmlized mail were people have underlined or
jh> marked up text with bold or italic. These mails are generally
jh> quite horrible to read. However most of the markup
jh> (underline/bold/italic) can be simply reproduced in a normal
jh> emacs buffer without resorting to w3 (or any other
jh> browser). Is there a way I can do a simple washing of
jh> text/html messages.
I'm seeing a lot of this crap nowadays. Is this MS Lookout! output?
Sometimes I use html2text - with the article displayed, type `|' in
the Summary buffer and tell it to run a script.
It loses all formatting elsewhere in the message (any lynx
gurus/manpage readers out there?) but sometimes it's worthwhile.
,----[ ~/html2text ]
| #! /usr/local/bin/perl
|
| $^W = 1;
| use strict;
| use POSIX ();
| use Fcntl;
|
| my $tmp = POSIX::tmpnam();
| while( ! sysopen(F, $tmp, O_WRONLY|O_EXCL|O_CREAT, 0600) ) {
| die "Attempt to open $tmp failed: $!"
| unless $! =~ "File exists";
| $tmp = POSIX::tmpnam();
| }
|
| while(<>) {
| print F;
| }
|
| close(F)
| or die "Close of $tmp failed: $!";
|
| !system(qw(lynx -dump -force_html), $tmp)
| or die "System failed: $!";
|
| END {
| unlink $tmp if -f $tmp;
| }
`----
Hm. I guess it could be simplified, but oh well. Dunno where I got it.
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."
next prev parent reply other threads:[~2001-01-24 11:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-24 9:15 Joakim Hove
2001-01-24 11:38 ` Bill White [this message]
2001-01-24 14:06 ` Randal L. Schwartz
2001-01-24 15:03 ` Stainless Steel Rat
2001-01-24 15:22 ` Hannu Koivisto
2001-01-26 3:59 ` Error with function gnus-summary-pipe-output (Was htmlified mail) Mike Pullen
2001-01-26 8:17 ` Bill White
2001-01-26 13:20 ` ShengHuo ZHU
2001-01-28 20:44 ` James H. Cloos Jr.
2001-01-29 0:35 ` ShengHuo ZHU
2001-01-29 1:49 ` James H. Cloos Jr.
2001-02-06 6:51 ` ShengHuo ZHU
2001-01-26 19:01 ` James H. Cloos Jr.
2001-01-26 19:17 ` ShengHuo ZHU
2001-01-26 22:32 ` James H. Cloos Jr.
2001-01-26 23:00 ` ShengHuo ZHU
2001-01-27 21:17 ` James H. Cloos Jr.
2001-01-27 21:44 ` ShengHuo ZHU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ruo66j5qiwi.fsf@g.wolfram.com \
--to=billw@wolfram.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).