I am playing around with a new site that helps people find horses for sale, aptly named www.FindHorsesForSale.net. I wanted to provide searchers some background on the particular horse breed they were looking at, so I decided to provide the first few paragraphs from the wikipedia page for that horse breed, and then link off to the full wikipedia page. For example, see the content on the lower left of the paso fino horses for sale page.
After some searching around, I found the perfect tool – the wikipedia-client gem on github. As Judge Smails from Caddy Shack would say, “top notch, top notch!”
Here’s some quick code:
page = Wikipedia.find(horse_page_name)