event.db

event.db schema 'n' models for easy (re)use

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 »

Format

Markdown

Option 1) Classic (Simple) Style

- [European Ruby Konference - EuRuKo](http://euruko.org)
    - 2015 @ Salzburg, Austria; Oct/17+18

Option 2) Modern (New) Style

- **European Ruby Konference - EuRuKo** (web: [euruko.org](http://euruko.org))
    - 2015 @ Salzburg, Austria; Oct/17+18

resulting in:

#<EventDb::Model::Event:0xa286a54
  id:         1,
  title:      "European Ruby Konference - EuRuKo",
  link:       "http://euruko.org",
  place:      "Salzburg, Austria › Europe",
  start_date: Sat, 17 Oct 2015,
  end_date:   Sun, 18 Oct 2015,
  days:       2,
  created_at: 2015-07-12 08:51:52 UTC,
  updated_at: 2015-07-12 08:51:52 UTC>

Note: The headings hierarchy (starting w/ heading level 2) gets added to the place as a geo tree. Example:

## Europe

### Central Europe

#### Germany

##### Bavaria

###### Upper Franconia

resulting in:

Upper Franconia  Bavaria  Germany  Central Europe  Europe

Usage

url = "https://github.com/planetruby/awesome-events/raw/master/README.md"

r = EventDb::EventReader.from_url( url )
events = r.read

db = EventDb::MemDatabase.new    # note: use 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 › England (en) › Western Europe › Europe
  in 27d   European Ruby Camp - eurucamp, Fri-Sun Jul/31-Aug/2 (3d) @ Berlin (Potsdam), Germany › Europe
  in 27d   JRuby Conference Europe - JRubyConf EU, Fri Jul/31 (1d) @ Berlin (Potsdam), Germany › Europe
  in 28d   Burlington Ruby Conference, Sat+Sun Aug/1+2 (2d) @ Burlington, Vermont › New England › United States (us) › North America › America
  in 50d   Madison+ Ruby, Fri+Sat Aug/21+22 (2d) @ Madison, Wisconsin › Great Lakes › United States (us) › North America › America
  in 61d   Full Stack Fest - Barcelona Ruby Conference (BaRuCo) + Barcelona Future JS, Tue-Sat Sep/1-5 (5d) @ Barcelona, Catalonia › Spain / España (es) › Southern Europe › Europe
  in 71d   RubyConf Taiwan, Fri+Sat Sep/11+12 (2d) @ Taipei › Taiwan (tw) › Asia
  in 72d   RubyConf Portugal, Mon+Tue Sep/14+15 (2d) @ Braga › Portugal (pt) › Southern Europe › Europe
  in 78d   RubyConf Brasil, Fri+Sat Sep/18+19 (2d) @ São Paulo › Brazil / Brasil (br) › South America › America
  in 83d   Rocky Mountain Ruby Conference, Wed-Fri Sep/23-25 (3d) @ Boulder, Colorado › Rocky Mountains › United States (us) › North America › America
  in 85d   Ruby Open Source Software (ROSS) Conference - ROSSConf, Sat Sep/26 (1d) @ Berlin, Germany › Europe
  in 93d  ArrrCamp, Thu+Fri Oct/1+2 (2d) @ Ghent, Oost-Vlaanderen › Belgium / België / Belgique (be) › Western Europe › Europe
  in 105d  RubyConf Colombia, Thu+Fri Oct/15+16 (2d) @ Medellin › Colombia (co) › South America › America
  in 107d  European Ruby Konference - EuRuKo, Sat+Sun Oct/17+18 (2d) @ Salzburg, Austria › Europe
  in 132d  RubyWorld Conference, Wed+Thu Nov/11+12 (2d) @ Matsue › Japan (jp) › Asia
  ...

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!