Spread and use Firefox
Advertise on this blog!
-->

Subscribe to my posts via Email


Delivered by FeedBurner

I'm an Indian
Darn proud of being an Indian!

Links...

Categories

Archives

Friends



Subscribe





External Links


September 21, 2008

How to stip tags, script and style off the HTML

Havn’t you just wished sometimes that all the html, script and style tags would just vanish from the html pages and all you get is pure text (for fun and profit). Well, here’s how I am managing it

require “open-uri”
require “hpricot”
require “sanitize”

html = open(”http://www.google.com”)
hp = Hpricot(html.read)
hp.search(”script”).remove
hp.search(”style”).remove
sanitize(hp.innerHTML, okTags=”")

And output?

“GoogleWeb Images News Orkut Groups Gmail more […]

September 17, 2008

Earthquake in Pune

This is probably the first time in my life when I was fuly aware of the quake - and am close enough to a laptop to blog about it. As per timeanddate.com, its 3:20 AM on 17th Sept 08 morning. Lets see, what do the newspapers report tomorrow

September 10, 2008

Hello World - all over again!

Saying hello to FF extensions