html renderer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michele Simionato

    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

    #2
    Re: html renderer

    Am Sun, 16 Nov 2003 06:10:04 -0800 schrieb Michele Simionato:
    [color=blue]
    > 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.[/color]

    Hi,

    may be this helps:

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

    thomas

    Comment

    • John J. Lee

      #3
      Re: html renderer

      mis6@pitt.edu (Michele Simionato) writes:
      [color=blue]
      > I am looking for a textual html renderer (such as lynx) to be[/color]
      [...][color=blue]
      > important, easy of use is very important. Portable solutions are
      > better, but a Linux only solution would be good enough.[/color]

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


      John

      Comment

      Working...