[elinks-users] Piping to elinks - skip popup dialog?

2010-01-22 Thread Chris Jones
It's apparently possible to invoke ELinks as the last step in a pipe and
use it as a pager.

An artificial example might be:

$ cat file | elinks

This fires up a new instance of ELinks that displays this dialog:

┌─┐
│ │
│  What would you like to do with 'stdin' type: text/plain?   │
│ │
│  Program ('%' will be replaced by the filename) │
│     │
│ │
│  [X] Block the terminal │
│ │
│  [ Open ]   [ Save ]   [ Display ]   [ Show header ]   [ Cancel ]   │
└─┘

The [ Open ] button is focused so hitting Enter makes Elinks display
the file's contents.

If I don't specify 'Program' or '%', and ELinks defaults to itself, so
to speak, which makes me think that I should be able to skip the popup. 

I played with the options under 'Options Manager - MIME' and ELinks's
command-line switches, but I am still seeing this popup.

Is there any way I could have Elinks skip this dialog?

Thanks,

CJ


___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Piping to elinks - skip popup dialog?

2010-01-22 Thread Jim Pryor
On Fri, Jan 22, 2010 at 01:12:53PM -0500, Chris Jones wrote:

 If I don't specify 'Program' or '%', and ELinks defaults to itself, so
 to speak, which makes me think that I should be able to skip the popup. 
 
 I played with the options under 'Options Manager - MIME' and ELinks's
 command-line switches, but I am still seeing this popup.
 
 Is there any way I could have Elinks skip this dialog?

Try piping to something like elinks -force-html.


-- 
Jim Pryor
prof...@jimpryor.net
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Piping to elinks - skip popup dialog?

2010-01-22 Thread Chris Jones
On Fri, Jan 22, 2010 at 03:17:30PM EST, Jim Pryor wrote:
 On Fri, Jan 22, 2010 at 01:12:53PM -0500, Chris Jones wrote:

  to speak, which makes me think that I should be able to skip the
  popup. 
  
  I played with the options under 'Options Manager - MIME' and
  ELinks's command-line switches, but I am still seeing this popup.
  
  Is there any way I could have Elinks skip this dialog?
 
 Try piping to something like elinks -force-html.

Thanks, but I tried that and it does not do what I want:

When I hit the [Open] button after the dialog pops up, the input is
rendered in simile-html fashion - i.e. I can navigate to http links,
email addresses, etc. 

With -force-html I only get a long line of characters with no
formatting whatsoever.

What I'm doing is using the mutt mailer's '|' aka 'pipe' command to
switch to Elinks with the current message as input. From that point on I
am in 'browser mode', and can navigate the message as if it were a web
page, and otherwise benefite from all of Elinks's rendering and
navigation features, which is considerably more effective than having
the message rendered 'elinks -dump' or harvesting the links via urlview
or urlscan.

In essence, it's as if I had converted a text file/message to html and
pointed ELinks to the resulting file.

This work quite well, except that I'm getting a little frustrated at
seeing this popup and having to hit Enter all the time. :-)

CJ


___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Piping to elinks - skip popup dialog?

2010-01-22 Thread Jim Pryor
On Fri, Jan 22, 2010 at 03:59:20PM -0500, Miciah Dashiel Butler Masters wrote:
 On 01/22/2010 03:43 PM, Chris Jones wrote:
 [...]
  What I'm doing is using the mutt mailer's '|' aka 'pipe' command to
  switch to Elinks with the current message as input. From that point on I
  am in 'browser mode', and can navigate the message as if it were a web
  page, and otherwise benefite from all of Elinks's rendering and
  navigation features, which is considerably more effective than having
  the message rendered 'elinks -dump' or harvesting the links via urlview
  or urlscan.
 
  In essence, it's as if I had converted a text file/message to html and
  pointed ELinks to the resulting file.
 
  This work quite well, except that I'm getting a little frustrated at
  seeing this popup and having to hitEnter  all the time. :-)
 
 Try running ELinks with -eval 'set mime.default_type = text/html'.

This should be the same as using -force-html. I'm not promising you it
is the same, but it's supposed to be the same.

-- 
Jim Pryor
prof...@jimpryor.net
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users