Posts Tagged ‘hpricot’

20081024 How to install hpricot in Ubuntu 8.4

This could be considered a fresh installation, speaking in ruby terms. I just had ruby installed, no ruby gems, nor ruby dev nor anything else ruby. So this should be enough for installing hpricot as well as ruby gems (which are required for installing hpricot). As you can see, I didn’t download any source file, [...]

20080325 Parsing a del.icio.us export with Hpricot

The trickiest part is to detect if a bookmark has a corresponding description. The export is in the same format that Netscape used for its bookmarks export, which means it is a simple html file with a definition list (dl) and a series of definition terms (dt). A term (=bookmarks) may have a description (dd). [...]

20071005 Removing elements with Hpricot

Something like a month ago, a guy asked me how to remove elements with Hpricot. I told him I would look into it but it’s been a month already! So I hope I can compensate for the delay with this minitutorial on removing stuff with Hpricot! :-) First I created a simple test page. It’s [...]

20070615 Extracting data with Hpricot

For those (few) of you which haven’t heard about it, Hpricot is a nice library for parsing HTML in ruby, created by the even nicer _whytheluckystiff, author of Poignant’s Guide to Ruby, Camping and other ruby gems (may you excuse the pun? it was impossible to avoid it). Since I saw one demonstration by Rob [...]

20070313 London Ruby Users Group brings you back to uni

After three failed attempts, I managed to go to yesterday’s lrug meeting. It was intended to be a kind of experimental collective code review, so people would contribute with pieces of code and get it dissected and improved collectively. There was an special obsession with Hashes, most of the code submissions were improvements and/or workarounds [...]