Created
October 21, 2009 20:17
-
-
Save ctm/215427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# $VERBOSE = true | |
require 'rubygems' | |
require 'ri_cal' | |
require 'tzinfo' | |
# We're in Albuquerque, so we make Mountain time our time zone | |
# Speaking of time zones, the following URL is worth skimming | |
# http://wiki.github.com/rubyredrick/ri_cal/why-doesnt-rical-use-the-zone-from-ruby-times | |
RiCal::PropertyValue::DateTime.default_tzid = 'America/Denver' | |
get_togethers = RiCal.Calendar do |cal| | |
cal.event do |event| | |
event.summary = 'Ruby on Rails Get Together' | |
event.description = '15 minute Rails presentation followed by Ruby/Rails chit-chat' | |
event.dtstart = DateTime.parse('20091006 18:00') | |
event.dtend = DateTime.parse('20091006 20:00') | |
event.location = 'SWCP A/V Room' | |
event.add_rrule("FREQ=MONTHLY;BYDAY=1TU") | |
end | |
cal.event do |event| | |
event.summary = 'Ruby Get Together' | |
event.description = '15 minute Ruby presentation followed by Ruby/Rails chit-chat' | |
event.dtstart = DateTime.parse('20091020 18:00') | |
event.dtend = DateTime.parse('20091020 20:00') | |
event.location = 'SWCP A/V Room' | |
event.add_rrule("FREQ=MONTHLY;BYDAY=3TU") | |
end | |
end | |
File.open('ruby.ics', 'w') do |file| | |
get_togethers.export(file) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment