lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev proposal for LYK_SCRIPT and patch


From: Eduardo Chappa L.
Subject: Re: lynx-dev proposal for LYK_SCRIPT and patch
Date: Wed, 30 Jun 1999 11:07:02 -0700 (PDT)

*** Henry Nelson (address@hidden) wrote Today:

:) > right, wait until someone takes the painful task of writing the code, we
:) > can give them a script that will solve their problem, while the real
:) ...
:) >   I can send more explicit examples if you want me to, just ask.
:) 
:) I would like some examples that show that something cannot be done by
:) already extant methods.  Combined with a menu script giving any number
:) of choices for action on a document of a certain protocol, EXTERNAL
:) can do an awful lot already (Doug Kaufman, Thu, 15 Oct 1998).  The
:) same can be said of PRINTER and DOWNLOADER (e.g. http://www.t3.rim.or.jp/
:) ~patakuti/lynx/enhanced/t2thtml).
:) 

I am not saying a command can not the job, what I am saying is that
LYK_SCRIPT is the right way to do the job.

 First let me tell you the differences with printer and downloader. 

- LYK_SCRIPT is faster (way more faster): if I wanted to use, say
downloader, to apply an script to a page, what I would do, would be press
the backspace, then download, this takes some time, then if I have
exec_links enabled, I would use my jump file to apply an script to the
document and either show the output of the modified document with an extra
program (maybe lynx, but not my current session of lynx - except of course
now you use the dired mode and open the document with your own session)
too long. With Downloader you have to open the page twice (from the
server) in order to use it. LYK_SCRIPT however uses your cache source,
makes a modification with your script and displays the page immediately
after the script has finished, you have now the modified document in your
cache. So the big advantage is that you get your problem solved as soon as
it got originated. No need to get frustrated.

 - LYK_SCRIPT is based on the use of external, so you are not going to get
anything better in terms of time here. EXTERNAL is almost equivalent to
DOWNLOADER (in what the command does), but saves you time because you
don't need to download a page twice. The main difference with LYK_SCRIPT
is that the page that gets automatically displayed after external is the
current web page, not the one you want to see, and also a very important
difference is that EXTERNAL will only work if you have a say "ftp" or
"http" or "mailto" etc. reference inside your document, which may not be
the case, as it was for the case of the person that had to press a
"javascript button" in lynx and did not have any way to send a form. What
I am suggesting is something that will always work, no matter which tags
you have inside the document. The script may be applied no matter what.

Now an example. This is a page in spanish, but you don't need any
knowledge of this in order to realize that the output is really ugly.
There is no separation between paragraphs and it is difficult to read. I
have written letters explaining the problem and have not received any
answer, however if you apply the following command to the html code of the
page you get a much better displayed page (one that is readable).

Page:
http://www.elmercurio.cl/Ediciones/30061999/html/0130061999001A0010105.asp

command you apply to it to get a better output:
sed "/table/,/\/table/{s/<br>/<p>/g;}" orig_file > aux_file;mv aux_file
orig_file

Now to do all this process it takes me no more than 5 seconds (the command
is already inside a script, ready for me to use), the question is "can you
beat this time in any other way or you have to give up because you don't 
want to do this long process many times?"

More examples available...

Eduardo
http://www.math.washington.edu/~chappa/personal.html






reply via email to

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