Project

onthisday

0.0
No commit activity in last 3 years
No release in over 3 years
A little parser for Wikipedia's 'On This Day' content block
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

On This Day¶ ↑

A simple ruby parser for Wikipedia’s “On this day” box on the (english-language) homepage.

Usage¶ ↑

Install the gem

gem install onthisday

Then fetch the current news items

@onthisday = OnThisDay::Parser.new
items = @onthisday.items

Items have text

items.first.text #=> "French Revolution: Meeting on a tennis court near the Palace of Versailles, members of France's Third Estate took the Tennis Court Oath, pledging not to separate until a new constitution was established."

A year

items.first.year #=> 1789

And associated topics (other related wikipedia pages)

items.first.topics #=> ['French_Revolution', 'Palace_of_Versailles', 'Estates_of_the_realm', 'Tennis_Court_Oath', 'Constitution']