Friday, December 02, 2005

BeautifulSoup and Ruby

I have been writing some simple script that would take a word HTML table and take out all that gunk attributes within the html leaving out only pure TR and TD elements. If you want to ask, I am doing this so that our FIT tables become a bit thinner. This also gave me a way to play with Ruby a bit

So, I looked around for a good parser for the HTML. I found BeautifulSoup port for Ruby. This is is truly a screenscraping parser but works beautifully. The coolest thing is that it allows for malformed HTML.

This is great.

yield keyword in Ruby, combined with "&" and .call are awesome.

Oh, I have started using Eclipse as my primary IDE for my ruby development and it helps a lot since it allows writing and running Test::Unit a breeze.

All in all, woohoo!

0 Comments:

Post a Comment

<< Home