#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    18
    Rep Power
    0
    Does anyone know of any scripts that will parse a webpage just as text (replaces images with the alt tags etc).

    Our university page is insistent on having text equivalents of its pages. A perl script to automate things would be much easier than re-writing all of them in text form!
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    What you saying is to remove all html tags? How about hyperlinks?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    18
    Rep Power
    0
    I want to keep it as a web page- just want to set to a white background and black text (to make it easy to read for people with impaired eyesight etc)

    Have a look at:
    http://www.warwick.ac.uk/cgi-bin/bet...warwick.ac.uk/

    when links are clicked on then the new page will be sent to the script for formatatting the same way and so on- that way you could move through the entire site in just a Text only format

    [This message has been edited by hotatom (edited August 29, 2000).]
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    Shoulds like allot of fun (the scripting that is).

    Here are some suggestions to get you going:

    Use libww-perl to grab the theml contents into a variable.

    Once in that variable, you can use some regular expressions to strip things like images ect.

    Then use some more regular expressions change all links to point to that script again. Example:

    strip.pl?http://www.page.com/page.html

    then in that page all links would be:
    <a href="strip.pl?http://www.page.com/linkedpage.html">Link!</a>
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    18
    Rep Power
    0
    Cool but are there any pre-written scripts out there that do this? I'm a PHP man and don't have time to learn Perl- also the projects server i'm working with doesn't have PHP support- only Perl
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Singapore
    Posts
    21
    Rep Power
    0
    Er... isn't that what lynx does? A text only web browser?

IMN logo majestic logo threadwatch logo seochat tools logo