Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 29th, 2000, 11:57 AM
hotatom hotatom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 18 hotatom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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!

Reply With Quote
  #2  
Old August 29th, 2000, 01:57 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
What you saying is to remove all html tags? How about hyperlinks?

Reply With Quote
  #3  
Old August 29th, 2000, 02:25 PM
hotatom hotatom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 18 hotatom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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/be....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).]

Reply With Quote
  #4  
Old August 29th, 2000, 02:55 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
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>

Reply With Quote
  #5  
Old August 29th, 2000, 03:12 PM
hotatom hotatom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 18 hotatom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #6  
Old August 29th, 2000, 05:14 PM
Chong_Sun Chong_Sun is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Singapore
Posts: 21 Chong_Sun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chong_Sun
Er... isn't that what lynx does? A text only web browser?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Script to make 'Text Only' versions of web pages...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway