If the Supreme Court says that you have the right to consensual gay sex within your home, then you have the right to bigamy, you have the right to polygamy, you have the right to incest, you have the right to adultery. You have the right to anything. All of those things are antithetical to a healthy, stable, traditional family and that's sort of where we are in today's world, unfortunately. It all comes from, I would argue, the right to privacy that doesn't exist, in my opinion, in the United States Constitution.
- Senator Rick Santorum (R-PA)
::   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
Leash gal sex pics
Japan and Atomic Bomb Effects

Random Entries:
The Atomic Theory Of Matter - Rereasoned
Write your own Dubya speech!
You people are sick!
We are the space robots
DirtyGreek.Org Del.icio.us Links

World Food/Slow Food
Globalization of Food and Agriculture
NAIS? Ridiculous.
The Effects of Globalization on Developing World Agricultural Systems
Jalapenos and Salmonella - Same Old Story?
Industrial Agriculture and Vertical Integration
London Restaurants

Recent Comments:
Greek Orthodox Church In Trouble?
North Carolina Smoking Ban - 1 Day In
Blogathon Post 1 - Globalization and Agriculture
Bush Calls For ANWR Drilling Again
Joe The Unbeliever - My Response to Crucial's Video About Me
george-at-dirtygreek.org george-at-dirtygreek.org



Twitter / DirtyGreek
Follow DirtyGreek on Twitter

My Flickr Photos
Syndicate Me!
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 Coding googlecalendar php coding twitter gcal google rss
Share And Enjoy: Post To Del.icio.us Post To Socialposter.com Post To Digg Post To Reddit Post To Technorati Post To Blinklist Post To Stumbleupon Post To Twitter Post To Google Bookmarks Post To NewsVine Post To Microsoft Live Email To A Friend

My Related Posts: US To Begin Withdrawal In December? // Google Maps and Accoutability // My Election Result Guesses - With Maps! // Fun With Google // McCain - Pallin' Around With Militia Group Arms Suppliers //
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