Then let me hear no more of our kind's natural necessity to form hierarchical groups. An observer viewing human life shortly after cultural takeoff would easily have concluded that our species was destined to be irredeemably egalitarian except for distinctions of sex and age.
- Marvin Harris
::   Blog  ::   Photos  ::   Europe  ::   Books  ::   Articles  ::   Links  ::   Friends  ::   Combo Feed  ::   Mobile  ::    
Submit a story!
Need Help?

Powered by FeedBlitz

Most Popular
Download This American Life Episodes
An Experiment in Porn
Fuck For Forest
Carnival Of The Green #18
Japan and Atomic Bomb Effects

Random Entries:
The Republicans' favorite game
More On Rep. Bartlett's Peak Oil Presentation
Did you think they were weapons factories again?
Armitage Hints At Iraq Pull-Out
Del.icio.us Links

World Food/Slow Food
Globalization of Food and Agriculture
NAIS? Ridiculous.
Jalapenos and Salmonella - Same Old Story?
The Effects of Globalization on Developing World Agricultural Systems
GB #7 - Pesticide Contamination
London Restaurants

Recent Comments:
My First Complaint To President Elect Obama - No RFK at EPA
Congratulations, Mr. President Elect
NAIS? Ridiculous.
Ha Ha! Fruit Fly Research! Stupid Scientists!
McCain - Pallin' Around With Militia Group Arms Suppliers
Add me to your buddy list Send me an instant message
Link to Me!
george-at-dirtygreek.org george-at-dirtygreek.org



My Photos
Gallery RSS
My Flickr Photos
Syndicate Me!

Locations of visitors to this page
Register to Vote!
Dirty Greek - Updating Twitter With Google Calendar
  Coding : Updating Twitter With Google Calendar
You are NOT on the DirtyGreek.Org homepage. Please CLICK HERE to go there.

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.
Posted By George on 03/26/2007 @ 11:04 AM | Link and Discuss (1) | More
Share And Enjoy: Post To Del.icio.us Post To Socialposter.com Post To Digg Post To Furl Post To Reddit Post To Technorati Post To Blinklist Post To Stumbleupon Post To Twitter Post To Google Bookmarks Post To Pownce Post To NewsVine Post To Microsoft Live Email To A Friend


My Related Posts: Google Maps and Accoutability // Download This American Life Episodes // Ward Churchill Interview With Bill Maher // Web Comics With RSS Feeds // Check with the rapture boys before deciding //
No Example?

Um, you mind showing an example twitter account with this script updating to it? I saw you through the mailing list and I wanted to see an example, but no such luck here either.

Thanks for posting your script.

Posted by Ryan on 05/11/2007 @ 10:30 PM

Name
Email
Subject
  Security Image
 
Comment