A little parser for Wikipedia's 'In the News' content
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
AUTHORS
COPYING
Gemfile
README.rdoc
Rakefile
inthenews.gemspec

README.rdoc

In The News

A simple ruby parser for Wikipedia's “In the News” box on the (english-language) homepage.

Usage

Install the gem

gem install inthenews

Then fetch the current news items

@news = InTheNews::Parser.new
items = @news.items

Items have text

items.first.text #=> "The Supreme Court of Pakistan retroactively discharges Yousaf Raza Gillani from the prime ministership due to his contempt of court conviction."

And associated topics (other related wikipedia pages)

items.first.topics #=> ['Supreme_Court_of_Pakistan', 'Yousaf_Raza_Gillani', 'Prime_Minister_of_Pakistan', 'Contempt_of_court']