# iCal Calendar for WCA Competitions



## Lucas Garron (Mar 6, 2009)

If you use iCloud, Google Calendar, or any calendar program that handles iCal format, you can subscribe to the following URL and see all the upcoming competitions in your calendar. 

cubing.net/cal/wca.ics​
Just go to: Calendar > Subscribe > Add the URL "http://www.cubing.net/cal/wca.ics"

EDIT: Note, you either have to refresh it manually or automatically (I recommend weekly) to get updates. By default, iCal only does a one-time import.


----------



## byu (Mar 6, 2009)

Works for me! Thanks.

EDIT: TOW shows up on Friday, shouldn't it be Saturday?


----------



## Lucas Garron (Mar 6, 2009)

byu said:


> EDIT: TOW shows up on Friday, shouldn't it be Saturday?


Shows up as Saturday for me. Could you un-subscribe and re-subscribe and see if it persists?

I had to span two dates to make the event full-day, and I wasn't sure that sounded so safe.


----------



## Kian (Mar 6, 2009)

byu said:


> Works for me! Thanks.
> 
> EDIT: TOW shows up on Friday, shouldn't it be Saturday?



Canada is a day behind. You didn't know that?


----------



## byu (Mar 6, 2009)

I unsuscribed and resubscribed, now it works. Thanks.


----------



## tim (Mar 8, 2009)

Great idea .


----------



## tim (Nov 6, 2010)

Lucas Garron said:


> Tell me if you see any significant errors.


 
It has not been updated since July 2009 .


----------



## Lucas Garron (Nov 6, 2010)

tim said:


> It has not been updated since July 2009 .


Right, since I didn't know if anyone was using it, and some of the scripting code broke.

I just ran it, and to my surprise everything still works, so maybe I can find a way to maintain it.

EDIT: In case I didn't make it clear, the calendar has been updated with all future competitions.


----------



## tim (Nov 6, 2010)

Lucas Garron said:


> Right, since I didn't know if anyone was using it, and some of the scripting code broke.
> 
> I just ran it, and to my surprise everything still works, so maybe I can find a way to maintain it.
> 
> EDIT: In case I didn't make it clear, the calendar has been updated with all future competitions.



Thanks, Lucas 

In my opinion the iCal calendar is the best way to display WCA competitions. I was kinda sad, when i noticed that it wasn't updated anymore, but i also didn't want to bother you with it. So thanks again .


----------



## AndyK (Nov 6, 2010)

Love it!

I wonder if you could get CubingUSA to post this calendar on their site.


----------



## Stefan (Nov 6, 2010)

AndyK said:


> I wonder if you could get CubingUSA to post this calendar on their site.


 
Or WCA.


----------



## AndyK (Nov 7, 2010)

Stefan said:


> Or WCA.



And WCA, that'd be awesome


----------



## Lucas Garron (Nov 7, 2010)

Stefan said:


> Or WCA.


Yeah, if only someone had access to the codebase to implement something like this...

By the way, Google calendar has iCal URL imports, but does anyone know if that's an import or a subscription?


----------



## Stefan (Nov 7, 2010)

I know a guy who knows a guy who does have access.

Do you happen to have it in PHP (and would donate the code)? If not, is it as trivial as I think? Just produce an ics file with a simple template for each competition?

Google calendar does offer subscriptions and apparently updates every six hours:
http://www.google.com/support/calendar/bin/answer.py?hl=en&answer=37100
http://www.google.com/support/forum/p/Calendar/thread?tid=1008e72bbb67f320&hl=en
Can you test that?


----------



## DGraciaRubik (Nov 7, 2010)

I love it!!!
Thank you Lucas, it's very helpful.


----------



## JBCM627 (Nov 7, 2010)

Lucas Garron said:


> I generate the page using Mathematica (parsing data from the WCA site), so all the conversion is manually coded and "published". Tell me if you see any significant errors.


Golden hammer? 

The WCA could install this:
http://drupal.org/project/ical


----------



## Lucas Garron (Nov 7, 2010)

Stefan said:


> Do you happen to have it in PHP (and would donate the code)? If not, is it as trivial as I think? Just produce an ics file with a simple template for each competition?


Yeah, it's really easy to reverse-engineer the format or look for a simple specification.

I used Mathematica only because I was more familiar with the processing and I didn't want to worry about parsing edge cases in PHP.

Source code
(Note: It won't run unless you have some other files in place. Unless I update this post, just look at it for sample code.)




Stefan said:


> Google calendar does offer subscriptions and apparently updates every six hours:


Aha. I should really get better at monitoring my raw site logs.
Also, am testing.


----------



## aplarsen (Nov 9, 2010)

Google Calendar would be slick, as it already publishes in XML, iCal, RSS, and HTML.

Since the competition list is obviously already stored in a database, it seems redundant to be entering competitions into another calendar format. Depending on how the tables are structured, it should be really easy to format it correctly and dump the results into a dynamic iCal feed.

I've done this with my marathon training plan, since each time I train, the start date of the training program is based on the day of the race. My PHP script bases the entire calendar file on the start date, and I use Google Calendar to subscribe to the feed with the race date as an argument. The entire program is 37 lines...I think I wrote it in an hour.


----------



## hr.mohr (Nov 9, 2010)

Thread hijack:

I've made an iCal feed in java for the live results system that we use in Denmark: http://live.speedcubing.dk/ical.action


----------



## avgdi (Nov 9, 2010)

I didn't even know this app was on my computer. Thanks!


----------

