event.db
event.db schema 'n' models for easy (re)use
- home :: github.com/textkit/event.db
- bugs :: github.com/textkit/event.db/issues
- gem :: rubygems.org/gems/eventdb
- rdoc :: rubydoc.info/gems/eventdb
- forum :: [email protected]
Command Line Tools
NOTE: The command-line tools (e.g. rubyconf, kickoff, beerfest, etc.) for listing upcoming events (ruby conferences, football tournaments, beer festivals. etc.) moved to its own gem, that is, whatson. See the whatson project for more »
Usage
r = EventDb::EventReader.from_url( "https://github.com/planetruby/awesome-events/raw/master/README.md" )
events = r.read
db = EventDb::Database.new # note: by default uses in-memory SQLite database
db.add( events )
today = Date.today
puts 'Upcoming Ruby Conferences:'
puts ''
on = EventDb::Model::Event.live( today )
on.each do |e|
current_day = today.mjd - e.start_date.mjd + 1 # calculate current event day (1,2,3,etc.)
puts " NOW ON #{current_day}d #{e.title} #{e.start_date.year}, #{e.date_str} (#{e.days}d) @ #{e.place}"
end
puts '' if on.any?
up = EventDb::Model::Event.limit( 17 ).upcoming( today )
up.each do |e|
diff_days = e.start_date.mjd - today.mjd # note: mjd == Modified Julian Day Number
puts " in #{diff_days}d #{e.title}, #{e.date_str} (#{e.days}d) @ #{e.place}"
end
will print:
Upcoming Ruby Conferences:
NOW ON 2d RubyMotion Conference - #inspect, Wed+Thu Jul/1+2 (2d) @ Paris, France › Europe
in 18d Brighton Ruby Conference, Mon Jul/20 (1d) @ Brighton, East Sussex
Public Event Datasets
- awesome-events @ Planet Ruby - a collection of awesome Ruby events (meetups, conferences, camps, etc.) from around the world
- calendar @ football.db - a collection of awesome football tournaments, cups, etc. from around the world
- calendar @ beer.db - a collection of awesome beer events (oktoberfest, starkbierfest, etc.) from around the world
Install
Just install the gem:
$ gem install eventdb
License
The eventdb scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Questions? Comments?
Send them along to the ruby-talk mailing list. Thanks!