On 14:38 13 May 2002, Marco Fioretti <[EMAIL PROTECTED]> wrote:
| > I do my terminal work in a gnome terminal.  This has the advantage of
| > recognizing urls triggered by mouse over.  To launch a browser, either
| > right click for the context sensitive menu or hold alt and left click.
| 
| I know, but this doesn't work with "Hidden" URLS, does it? (See my
|  original example) That is why I was hoping to get w3m working, because
| it *displays* plain, well formatted ASCII, but *knows* which strings
| correspond to other hidden strings which are URLs. Would the gnome
| terminal open the right URL if given the "to know more click <HERE>"
| string?

Hmm. It would be nice if w3m would recite URLs inline as an option, but it
doesn't. How about this script:

        detab ${1+"$@"} \
        | sed 's|\(<[Aa] [^>]*[Hh][Rr][Ee][Ff]=\([^ 
>]*\)[^>]*>\)\(.*\)\(</[Aa]>\)|\1\3 [ \2 ]\4|g' \
        | w3m -dump -T text/html

I'm about to start using it for HTML filtering in place of plain w3m.
It hacks the HTML to turn:

        <A HREF=url>foo</A>

into:
        <A HREF=url>foo [ url ]</A>

which shows up nicely. It doesn't resolve relative URLs, but HTML email shoudn't
have any, not having a useful baseurl. This script is available here:

        http://www.zip.com.au/~cs/scripts/unhtml

for use in your mailcap like so:

        text/html; unhtml %s; copiousoutput

It seems to work fairly well here.
What say you?
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

If the Earth is the size of a pea in New York, then the Sun is a beachball 50m
away, Pluto is 2km away, and the next nearest star is in Tokyo.  Now shrink
Pluto's orbit into a coffee cup; then our Milky Way Galaxy fills North America.

Reply via email to