html renderer

M

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.

Any pointer?

TIA,

Michele
 
T

Thomas Guettler

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
 
J

John J. Lee

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top