Data or Environment: Or how I learned to stop worrying and love the Goog.
Apr 11


I like people to know where I am, in case they need to find me. I tend to have meetings in odd locations, and if someone needs to snag me between such meetings, it is useful if they have some idea where I am. So I make my calendar information public, and it is linked to from my blog. That works reasonably well for the premeditated conversations. But more and more I find people have spur of the moment questions to ask. Chat clients are great for this, and I use them a lot. But a simple ‘away’ message does not seem to work very well. Lots of people ignore them (great when the question does not have a need for instant response) or they ditch the question and never get an answer. So I attempt to keep my chat (and now other) status messages reflecting where I most likely am. Having done this for some time, I have seen a few people ask me what system I am using to do this, and so I thought I would share my process here. Not that this is the best way to get these tasks done, but it is a process that works for me. The steps involved seem logical to me, and even if the tools I use are not a good match for you, the structure may be.

 

My main computer is a Macintosh, running OS X 10.5. My shared calendaring solution is Oracle Calendar. My status messages targets are Adium, iChat, Twitter (which then feeds the status message on my blog), Facebook, and IRC (via Colloquy). 

 

To get started, I need to get my calendar information into iCal (the local mac app for calendars). This is so that the data is always available on my local machine in a way I can use in scripts. On a windows system, i would most likely target Outlook for this, as it is the most oft used calendar on that platform with lots of add ons. The UW has a way to subscribe directly to Oracle Calendar data from iCal, but it has some limitations. So i wrote an app called OraCal2iCal, and on demand it exports my Oracle Calendar data and imports it into iCal. It also adds an alarm to each event to call another application that I made, MacArthur. MacArthur sets status messages in all of the chat and web sites that I mentioned. Other mac applications that I have looked at for this that did not quite match all of my needs (but might other peoples) were moodblast and Statz.

 

MacArthur works by looking up the next calendar event in iCal, and offering up an away message of the form “At [location] for [meeting title]”. I can overwrite that suggestion if it is not what I want to set my status message. If I leave it alone, it sets the status message for the accounts I have configured to that message. It supports Adium and iChat directly, and can support others via extra scripts that it can run. In my case it generates a shell command of curl –user ‘username:password’ –data-binary ’status=StatusMessage’ http://twitter.com/statuses/update.json” (this calls a URL that uses my account credentials on twitter to set my status message. A similar thing could be done for Facebook, but I ran into an app called ‘MoodBlast” that does this in a better way, so I just call that. For my IRC status, I just put together a quick applescript that sets my status for Colloquy, and it sets my message for me if I am logged into an IRC room. I could optionally add a message into the chat room itself, but that seemed a bit too chatty.

 

Since OraCal2iCal sets an alarm on each one of my meetings to calls MacArthur, my status message will be updated with my location and meeting info even if I am away from my computer. When I return to my office, I can activate MacArthur again, but rather than letting it run automatically, I can type in whatever status message I want and hit the “Available” button, and it will set my status message to Available, and update my messages on all the apps/sites I have it configured for. It does a few other things for me as well, but they are outside the scope of this post.

 

I am also using an application called Proximity on my machine. I have paired it with my phone (it detects blue tooth devices), so that if my phone is out of range for more than 5 minutes, it will check to see if my status messages are already “Away”. If my status messages are NOT in that condition, it will launch MacArthur, and my status will be updated. If I do not have a meeting schedule for that time, my status message will simply be “I Shall Return”.

 

So in short, the steps I follow are:

1. Import calendar info into an easily accessible application

2. Set alarm on all (important) events to call app that sets status messages (or set status messages directly)

3. Configure status message changing app to look up calendar info, and set status on chat clients/sites that you care about

4. Configure a way to set all of your stats messages to Available if needed

5. Configure system to detect if you ‘wander away’ and set status messages accordingly.

 

If I were asked to suggest some things for a windows environment, I would look at;

1. Getting the calendar info into Outllook, as it looks to be the most robust calendar for this sort of thing on Windows. For Oracle Calendar users, this seems to have been easier with Outlook 2003, but there is hope that an importer for the latest release of Outlook will be available soon.

2. it may be easiest to set alarms by hand on events to start out with, and then look at automating that process. A colleague I work with has set up a twitter updating alarm on his outlook calendar and the code he is using is added at the bottom of this post if anyone wants it :).

3. I might leverage the twitter posting to drive other things like facebook and maybe even desktop chat clients, as twitter seems to be the easiest of these sorts of services to attach to these days.

4. If an automatic alarm adding thing for Outlook does not work, it might be worth just going for a solution that detects when your phone exits the space. Something like XXX may work for this, if you could make it look up your next meeting location and title and pass it along to some apps (such as calling a script such as the  twitter script above).

 

If anyone has any suggestions about how to do more stuff like this, or do it better, feel free to leave notes in the comments, or post links to support sites. This sort of thing can be fun, and is sometimes quite helpful.

 

The code and info for the outlook to twitter stuff is below:

Pre-requisite:

Download and install Twitter CLI from

http://phalacee.com/index.php?page=development&section=app&development=19

 

and install into an existing PATH (like “C:\Windows”)

 

The following Outlook macro goes into the “ThisOutlookSession” module and is executed whenever a Reminder event is fired by Outlook. Note that some of the commented sections that involving parsing text are done for my own purposes and follow my own event naming conventions, so they will need to be modified or eliminated.

 

 

Private Sub Application_Reminder(ByVal Item As Object)

 

  Select Case Item.Class

     Case olAppointment ‘26

 

          Dim strSubject As String

          Dim strLocation As String

          Dim strMessage As String

 

          strSubject = Item.Subject

 

 

           ‘Parse for non-meeting events that should not be Twitted

 

                ‘unconfirmed meetings (Oracle Calendar convention)

                If InStr(1, strSubject, “?]”) Then Exit Sub

 

                ’standard blocking of noon hour

                If InStr(1, strSubject, “Available for Lunch”) Then Exit Sub

 

                ’standard blocking of other times

                If InStr(1, strSubject, “No Meetings”) Then Exit Sub

 

                ‘Clean up Oracle Calendar attendance status crap

 

                strSubject = Replace(strSubject, “[+] “, “”)

                strSubject = Replace(strSubject, “[*+] “, “”)

                strSubject = Replace(strSubject, “[*-] “, “”)

 

                ‘Make some standard meeting locations more friendly

 

                Select Case Item.Location

                           Case “CACLST - Conf - MGH 320f”

                        strLocation = “the LST Suite meeting room”

                Case “Conf - 45plaza 210″

                        strLocation = “the 45th St. Plaza Conference Room”

                Case “Conf - 45plaza 280″

                        strLocation = “the 45th St. Plaza Conference Room”

                Case “Conf - Payables GAO Rm 109″

                        strLocation = “the Purchasing Conference Room”

                Case Else

                        strLocation = Item.Location

                End Select

 

                ‘Start building the message string for Twitter. This can be anything you want

 

                strMessage = “at the ‘” & strSubject & “‘ event “

 

                If strLocation <> “” Then

                        strMessage = strMessage & ” in ” & strLocation

                End If

 

                ‘execute the twitter command-line app and pass it strMessage

                ‘http://phalacee.com/index.php?page=development&section=app&development=19

                Call WSHRun(”twitter “”" & strMessage & “”"”, 0, False)

 

        ‘Other possible cases for a reminder object

 

        Case olContact ‘40

 

        Case olMail ‘43

 

        Case olTask ‘48

 

  End Select

End Sub

Leave a Reply