lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev Passing internal data to external handlers


From: Klaus Weide
Subject: Re: lynx-dev Passing internal data to external handlers
Date: Sun, 29 Nov 1998 06:14:40 -0600 (CST)

On Fri, 27 Nov 1998, Kim DeVaughn wrote:

> Something that I like to do when I save documents, is to prepend a sort of
> "header block" to them, telling from where and when they were obtained.  For
> example:
> 
>  >Linkname: Bzip2 Howto
>  >From: http://www.best.com/~dfetter/Bzip2-HOWTO/Bzip2-HOWTO.html
>  >Date: Fri Nov 27 12:05:49 PST 1998
>  >Last Mod: Tue, 18 Aug 1998 15:56:32 GMT
>  >
>  ><document>
> 
> I've been doing that "by hand" by first p(rinting) a copy of the Information
> (=) page, then appending the document proper to it (via my own PRINTER:
> definition, and handler script), then later going back and manually editing
> out all the extraneous Information page stuff.
> 
> All of which is a PITA.
> 
> What I'd like to be able to do, is pass various bits of internal information
> (title, url, etc) along to the PRINTER: handler in some way, and then let
> the script do with it as it wishes.
> 
> The method that comes to mind, is along the lines of what "trn" does for
> similar purposes.  That is, the user can specify all manner of internal
> information to be passed along to an external script, using a wide variety
> of %tokens, as formal args in the handler-invoking definition (eg, PRINTER:
> def, or whatever).
> 
> Has something like this been considered before?  Or is there some alternate
> way of accomplishing what I want to do, that I've overlooked?
> 
> Would anyone besides myself find something like this to be a useful feature?

For the Title this is already being done: it should be passed in the
environment variable LYNX_PRINT_TITLE to your script.  You might just
expand that to set other variables for other things of interest.  That
would certainly be simpler than defining a language with %tokens etc. for
this purpose.

    Klaus

reply via email to

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