Subject: piping HTML to lynx

From: Nancy McGough <[email-masked]>
Date: 17 Aug 1996 18:17:24 -0400

I'd like to be able to pipe an HTML doc to lynx (e.g., a MIME 
attachement that I receive in pine).  Can someone tell me the
best way to do it?  Right now I'm saving the doc as tmp.html
and then doing `lynx tmp.html' but it would be much nicer if
I could just do something like `|lynx $stdin'

Thanks,
Nancy

-- 
<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<*<
            @..@            Nancy McGough           /\_/\
           (----)           Infinite Ink           ( o.o )
          ( >__< )    http://www.jazzie.com/ii/     > ~ <

---

From: [email-masked] (Bob Brody)
Date: 17 Aug 1996 21:48:04 -0700

Nancy McGough <[email-masked]> writes:

> attachement that I receive in pine).  

It's been my understanding that this is not possible in lynx and
is one of (a variety of) reasons why lynx, for instance, is not
able to integrate with Emacs (such as w3, Netscape, others, do).
I look forward to being corrected about this.

Regards,
Bob
--

---

From: [email-masked] (Jungshik Shin)
Date: 18 Aug 1996 16:21:40 -0400

Nancy McGough <[email-masked]> wrote:

: Does anyone know if there are plans for a future version of lynx 
: to understand standard in (.e.g. `cat foo.html | lynx')?  What

  If Lynx as it is can't do that, you can always write a script
to do it for you. That's the way Unix works, isn't it?
Enclosed is a simple minded script for that.  Depending on your 
version of lynx, you may have to omit '-nolist' option. 

% cat lynxfilter

#!/bin/sh
trap 'rm -f /tmp/$$.*; exit 1' 1 2 15
IN=/tmp/$$.stdin.html
cat > $IN 
lynx -dump -nolist $IN
/bin/rm $IN

    Jungshik Shin

---

From: [email-masked]
Date: 19 Aug 1996 16:37:57 GMT

>I could just do something like `|lynx $stdin'

Assuming that the attachment comes as MIME type text/html
the following line in my .mailcap causes pine to "do the right thing."

text/html; lynx -force_html %s; \
           test=test -z "$DISPLAY" -a -z "$LYNX_VERSION"; needsterminal
           
The test clause says to use lynx if the DISPLAY variable is not defined
and lynx is not already running.  An earlier line in .mailcap uses netscape
if the DISPLAY variable is define.

---

From: [email-masked] (Larry W. Virden)
Date: 20 Aug 1996 15:30:29 GMT

According to Nancy McGough  <[email-masked]>:
:[email-masked] (Bob Brody) writes:
:>Nancy McGough <[email-masked]> writes:
:>> I'd like to be able to pipe an HTML doc to lynx (e.g., a MIME 
:>> attachement that I receive in pine).  
:>
:>It's been my understanding that this is not possible in lynx and
:>is one of (a variety of) reasons why lynx, for instance, is not
:>able to integrate with Emacs (such as w3, Netscape, others, do).
:>I look forward to being corrected about this.
:
:Does anyone know if there are plans for a future version of lynx 
:to understand standard in (.e.g. `cat foo.html | lynx')?  What
:character based browsers currently can get the html doc via stdin?
:In the meantime, does anyone have a script that I (and others)

Lynx's 2.5FM man page says:

OPTIONS
     At start up, Lynx will load any local  file  or  remote  URL
     specified  at  the  command line.  For help with URLs, press
     "?"  or "h"  while  running  Lynx.   Then  follow  the  link
     titled, "Help on URLs."

     -    If the only argument  is  '-',  then  Lynx  expects  to
          receive  the arguments from stdin. This is to allow for
          the potentially very long  command  line  that  can  be
          associated  with  the -get_data or -post_data arguments
          (see below).

among other things.  That means that stdin is already in use for something
- command line arguments which are longer than the terminal can accept.
So the currently method to do what is being describe is to pipe the
html document into a temporary file and then invoke lynx on that temporary
file.

I don't see any way around this due to the need for stdin elsewhere.
-- 
:s Larry W. Virden                 INET: [email-masked]
:s <URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
:s Unless explicitly stated to the contrary, nothing in this posting should
:s be construed as representing my employer's opinions.

---

From: Nancy McGough <[email-masked]>
Date: 18 Aug 1996 13:48:23 -0400

>I look forward to being corrected about this.

Does anyone know if there are plans for a future version of lynx 
to understand standard in (.e.g. `cat foo.html | lynx')?  What
character based browsers currently can get the html doc via stdin?
In the meantime, does anyone have a script that I (and others)
can use with pine to pipe an HTML MIME attachment to?

Thanks much,
Nancy