Home > wwdc > WWDC Session Times for iCal Import
WWDC Session Times for iCal Import
Posted on Wednesday, May 27, 2009 by android apps market for tablests
Here's a quick-and-dirty hack of the WWDC session script to create an iCalendar file that can be imported into iCal.
Again, this is public domain, feel free to hack away and improve it.
Again, this is public domain, feel free to hack away and improve it.
#!/usr/bin/env ruby
#
# This program will download the latest session JSON data
# from the WWDC website and turn it into an iCal
#
# Sorry about the cheezy HTML formatting; I am not a designer.
# If you'd like to contribute a better looking design, I'll
# incorporate it.
#
# Requires one of the following two gems to be installed:
#
# gem install json
# gem install json_pure
require 'rubygems'
require 'net/http'
require 'open-uri'
require 'json'
require 'date'
output = <<OUTPUT
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
OUTPUT
r = open("http://developer.apple.com/wwdc/data/sessions.json").read
parsed = JSON.parse r
data = parsed["SessionsData"]
data.each do | oneSession |
upperTime = DateTime.parse(oneSession["time"][0]["upper"])
lowerTime = DateTime.parse(oneSession["time"][0]["lower"])
output << "BEGIN:VEVENT\n"
output << lowerTime.strftime("DTSTART;TZID=US/Pacific:%Y%m%dT%H%M%S\n");
output << upperTime.strftime("DTEND;TZID=US/Pacific:%Y%m%dT%H%M%S\n");
output << "DESCRIPTION:#{oneSession["description"]}\n"
output << "LOCATION:#{oneSession["room"]}\n"
output << "SUMMARY:#{oneSession["title"]} (#{oneSession["id"].to_s})\n"
# output << "<TR>"
# output << "<TD>#{oneSession["id"]}</TD><TD>#{oneSession["title"].to_s}</TD><TD>#{oneSession["focus"].to_s}</TD><TD>#{oneSession["level"].to_s}</TD><TD>#{oneSession["type"].to_s}</TD><TD WIDTH = \"200\">Start: #{lowerTime.to_s} <BR/>End: #{upperTime.to_s}</TD><TD>#{oneSession["room"].to_s}</TD><TD>#{oneSession["description"].to_s}</TD></TR>\n"
#
output << "END:VEVENT\n"
end
output << "END:VCALENDAR"
File.open("sessions.ics", 'w') {|f| f.write(output) }
Category Article wwdc
Powered by Blogger.
Blog Archive
-
▼
2009
(496)
-
▼
May
(55)
- Another List for WWDC First-Timers
- Nearby Intersections on GOOG-411
- Nearby Intersections on GOOG-411
- Part 6
- WWDC Session Data Now Available at Attendee Site
- WWDC Session Data is Gone
- WWDC JSON Credit
- Another iCal Script
- WWDC Session Times for iCal Import
- Better Session Script
- WWDC Session Times
- Another Party, RSVP Required
- Multitouch on a MacBook
- Yet Another WWDC Party List
- OpenGL ES From the Ground Up, Part 6: Textures and...
- Mini Picture Sudoku Gadget
- Wolf Shirt Update
- Wolf Shirts
- Concurrent Operations (aka Threading)
- Google Sync Beta - Now for S60
- Google Sync Beta - Now for S60
- WWDC Party List
- Device Detection
- Yahoo Limits Mobile Development to One Platform
- iPhone Intelligence Party
- The Iterative Web App - Gmail for Mobile Gets Labels
- The Iterative Web App - Gmail for Mobile Gets Labels
- Nokia N Series: Highly innovated devices
- Meet the Nokia N97 and its smartphone rivals
- Just for the Record
- Feed Changes
- Dick Move - iwyre.net
- Google Product Search for Android now with Barcode...
- Google Product Search for Android now with Barcode...
- WWDC First Timer's Guide Redux
- OpenGL ES From the Ground Up, Part 5: Living in a ...
- Behind the scenes of the NYC - Google mapping part...
- Behind the scenes of the NYC - Google mapping part...
- No Steve-Note
- Sky Map for Android - A Mobile Planetarium
- Sky Map for Android - A Mobile Planetarium
- GoGadget
- Cheeky Quote Gadget
- YouTube uploads and more now available on Android
- YouTube uploads and more now available on Android
- Procedural Spheres in OpenGL ES
- New BlackBerry Enterprise Server Packages for Goog...
- New BlackBerry Enterprise Server Packages for Goog...
- Use Google Apps seamlessly with corporate BlackBer...
- Use Google Apps seamlessly with corporate BlackBer...
- Do more with Google Latitude!
- Do more with Google Latitude!
- OpenGL ES From the Ground Up, Part 1 Addendum: Alp...
- setupView: from Part IV Rewritten
- OpenGL ES From the Ground Up, Part 4: Let There Be...
-
▼
May
(55)