Well traffic is kind of bad. They're widening easy street to fit more SUVs; they're planting baby trees to grow to shady peaks.
- Desaparecidos
::   Blog  ::   Photos  ::   Europe  ::   Books  ::   Articles  ::   Links  ::   Friends  ::   Combo Feed  ::   Mobile  ::    
Need Help?

Powered by FeedBlitz
Feed: RSS Feed: http://www.dirtygreek.org/dirtygreek.rss

Most Popular
Download This American Life Episodes
An Experiment in Porn
Fuck For Forest
Leash gal sex pics
Japan and Atomic Bomb Effects

Twitter

@dirtygreek


george-at-dirtygreek.org george-at-dirtygreek.org


My Flickr Photos
Syndicate Me!
Dirty Greek - Updating Twitter With Google Calendar
  Coding : Updating Twitter With Google Calendar
Previous: My Sustainable Design Principles - 03/23/2007 @ 04:35 PM
Next: Useful Google Calendar RSS Feed - 06/15/2007 @ 01:25 PM

I can't believe I haven't found someone else who has done this, though surely someone has. I don't even really use Twitter except for the programming fun of it, but I figured since it's blowing up right now, I'd try this out.

What this script does is read a Google Calendar feed and check each event's time against the current time. If the event's time falls within a given span around the current time (default is one hour), it will post the event's details to Twitter. In other words, Google Calendar will tell Twitter what you're doing at the current time.

The reason this was a bit of a hack job is that GCal's feed doesn't give you the event's time in the time field, it gives you the time when the event was posted. This is stupid in my opinion, and hampers the ability of others to use the feed realistically. This script takes the event's actual time from the event's description and properly reads it using PHP's strtotime function. It then compares that date against the current time. I plan on using the code I wrote here that makes use of the event's actual date and time to produce a useful RSS feed from a Google Calendar XML feed at some point.

Interfacing your Google Calendar with Twitter in this way is going to take some knowledge of PHP, RSS feeds, and maybe Yahoo Pipes in a pinch, but maybe I or someone else can find a way to make the whole process more simple.

The first thing you need to do is take your Google Calendar XML feed and convert it to true RSS format. Unfortunately, as of now, it's not in the right format. I made a quick Yahoo Pipe to do this. It should be run automatically from the script, so all you need to do is enter your Google login email in the script. It should take care of the rest.

Unfortunately, sometimes Yahoo Pipes hiccups and doesn't return any output. If this happens, just run the script again.

Let me know what you think, feel free to modify the script as long as you give me credit, and tell me if you make any major improvements.

Download Gcal-Twitter

UPDATE: If you downloaded before this update was posted, you may want to re-download.
Link or Discuss | By George on 03/26/2007 @ 11:04 AM | Share And Enjoy: Post To Twitter Post To Del.icio.us Post To Digg Email To A Friend

Tags:
My Related Posts: Feathered Dinosaurs? Imagine Jurassic Park With Big Birds! // Google Maps and Accoutability // Google Ads // GB #18 - Dinner With The Fam // More Yahoo Pipes //