lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV External filters (was: converting Pine addressbook to html)


From: Klaus Weide
Subject: LYNX-DEV External filters (was: converting Pine addressbook to html)
Date: Mon, 24 Feb 1997 16:29:55 -0600 (CST)

On Sun, 23 Feb 1997, Tom Zerucha wrote:
> On Sun, 23 Feb 1997, Jim Spath (Webmaster Jim) wrote:
> 
> > On Sat, 22 Feb 1997, Tom Zerucha wrote:
> > > Since we have multiple bookmarks, could there be read-only bookmarks that
> > > take the output of a command, e.g.
> > > Bookmark P = "#!/bin/sh;cat ~/.addressbook | pineab2html"
> > > (less than half baked, but you get the idea).
> 
> Apparently not...
>  
> > Ahh.  So we need Lynx to be able to read from stdin, or a pipe, to extend
> > this to similar features, such as converting an email folder on the fly to
> > hypertext format.  Theoretically, this doesn't sound too hard.  How would
> > we distinguish this ability from the present use of "-" on the command
> > line as indicating arguments are from stdin?  Perhaps "-pipe"? 
> 
> Different locus of change.  If I already use Pine (since I don't think
> Lynx supports pop3: URLs), I might want to maintain my mail reader
> separately from Lynx, but be able to mailto: using the file.
> 
> I was thinking of adding this TO THE MULTIPLE BOOKMARK SECTION, so that
> instead of reading a file, it would run a program and read the output from
> that program, much like the "pipe" command in pine, (vi, emacs, ...).
> 
> An earlier suggestion would be to define a filter lynx could use between
> the HTTP receive and the rendering (so I could put my table renderer or
> whatever there).

[ I am commenting mostly on the last sentence, I haven't tried to
understand exactly the exact use of this w.r.t. bookmarks, pine, etc. ]

Implementing a HTStream which pipes bytes through an external filter 
program would in itself not be difficult (on Unix and "similar enough")
systems.  In fact, it has already been done:  See WebFilter at

   Linkname: Filtering the Web using WebFilter
        URL: http://math-www.uni-paderborn.de/~axel/NoShit/

The file HTPipe.c from the sources of WebFilter could be used within
Lynx with little adaptation.  (It is meant to be included in the CERN
*server*, but the server code is based on the same Reference Library
as Lynx, so it used the same data structures - HTStream * etc.)
Tom, are you up to putting it in the Lynx code?

The problems:

1/ It will not work on all (non-Unix) systems.

2/ The main problem is when and how to decide and control *when* to
call this.  It probably doesn't make sence to pipe every piece of
text/html through such an external program - much too much overhead.  
But there is no external indication when a document needs to be piped
through this for e.g. table rendering.  So it must be under user 
control.  Which means adding new command line flags, Options, keystroke
etc.

(WebFilter uses an extended rule file syntax for deciding when to include
the external filter program in a pipe, based on regex matching on the URL.
But (1) I don't think that is good enough for a clinet like Lynx, and
(2) rule files are already used in the CERN server, but not in Lynx -
although there is a hook for it in HTAccess.c's get_phusical().)

  Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]