Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   html renderer (http://www.velocityreviews.com/forums/t324945-html-renderer.html)

Michele Simionato 11-16-2003 02:10 PM

html renderer
 
I am looking for a textual html renderer (such as lynx) to be
called from a Python program. The only needed functionality is
the following: passing to it a string it should show the html file at
the first match of the string (it does not seem obvious to do it with
lynx, please correct me if I am wrong). Essentially, I want to be able to
to browse rapidly over a bunch of html files. Fancy graphics is not
important, easy of use is very important. Portable solutions are
better, but a Linux only solution would be good enough.

Any pointer?

TIA,

Michele

Thomas Guettler 11-17-2003 02:58 PM

Re: html renderer
 
Am Sun, 16 Nov 2003 06:10:04 -0800 schrieb Michele Simionato:

> I am looking for a textual html renderer (such as lynx) to be
> called from a Python program. The only needed functionality is
> the following: passing to it a string it should show the html file at
> the first match of the string (it does not seem obvious to do it with
> lynx, please correct me if I am wrong). Essentially, I want to be able to
> to browse rapidly over a bunch of html files. Fancy graphics is not
> important, easy of use is very important. Portable solutions are
> better, but a Linux only solution would be good enough.


Hi,

may be this helps:

# untested
fd=os.popen("lynx -dump foo.html")
content=fd.read()
fd.close()
idx=content.find("yourtext")
print content[idx-20:idx+20]

thomas


John J. Lee 11-17-2003 04:27 PM

Re: html renderer
 
mis6@pitt.edu (Michele Simionato) writes:

> I am looking for a textual html renderer (such as lynx) to be

[...]
> important, easy of use is very important. Portable solutions are
> better, but a Linux only solution would be good enough.


Just a note, since people seem to assume otherwise: lynx is
cross-platform :-)


John


All times are GMT. The time now is 12:38 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.