We shall require a substantially new manner of thinking if mankind is to survive.
- Albert Einstein
::   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
Geography of Nowhere
An Experiment in Porn
Fuck For Forest
Leash gal sex pics

Twitter

@dirtygreek


george-at-dirtygreek.org george-at-dirtygreek.org
The Out Campaign: Scarlet Letter of Atheism


My Flickr Photos
Syndicate Me!
Dirty Greek - Updating Twitter With Google Calendar
Previous: My Sustainable Design Principles          
Next: Useful Google Calendar RSS Feed          
  Coding : Updating Twitter With Google Calendar
You will no longer see new posts on this page. New posts will appear here

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: How Much Would You Save With A Hybrid? // Feathered Dinosaurs? Imagine Jurassic Park With Big Birds! // McCain - Pallin' Around With Militia Group Arms Suppliers // GB #18 - Dinner With The Fam // Egypt Helped Iraq With Chemical Weapons! //