On Wed, Sep 19, 2001 at 09:20:57AM -0400, Jean-Sebastien Morisset decreed:
> Hi all.
> 
> I often receive plain/text e-mails with URLs in them. Normally, I would
> call up urlview, select the url, and then lynx would start-up to display
> that page. My problem is that some of the URLs point to images. :-) If I
> use the standard urlview->lynx technique, lynx will download the image,
> start xv (my prefered image viewer), and then exit. When lynx exits, it
> removes the temporary file it downloaded, which causes xv to display an
> error about not finding the specified file. :-)
> 
> Anyone have any ideas how I can download and view image URLs?

I tried urlview and decided that I prefered to see the entire email when
dealing with the links.  So I wrote my own script.

The attached Python script loads the entire email into a GUI browser as
HTML, with URLs made into real hyperlinks.

I have the following lines in my .muttrc to invoke it from Ctrl-b and
invoke the Opera browser.  It should be easy to adapt to other browsers.

macro index \cb "|email2html.py > /tmp/email.html; opera /tmp/email.html \n"
macro pager \cb "|email2html.py > /tmp/email.html; opera /tmp/email.html \n"

Let me know if this is useful enough to post somewhere.

Obviously enjoy it, but use it entirely at your own risk.

HTH and cheers,
Steve

-- 

                  \_O<  \_O<  \_O<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Steve Cooper          Redmond, WA

Reply via email to