Tom Steinberg on Open Data

We live in quite extraordinary times. We live at a moment where many of the most important politicians in our country and in some others overseas are actually eager to stand up and say that open data is an important priority for them, and for their nations. Just pause and think about it for a second: politicians! Talking about data! At all!

via Premise: Open Data: How Not To Cock It Up.

See DataSF for a great example of open data provided by a (municipal) government and some of the projects citizens have been rolling out with the said data.

IM/IRC/Skype Statuses Applescript Helper

Largely inspired by Beau’s equivalent setup, I rolled out a small Applescript to set my miscellaneous IM/IRC/Skype statues as away or available in one click.

set myStatus to display dialog "Select your IM Status:" buttons {"Away", "Available"} default button 1

-- Adium: Multiple IM and single IRC account statuses
if appIsRunning("Adium") then
	tell application "Adium"
		if the button returned of myStatus is "Away" then
			send the first chat of the first chat window message "/nick stephdau|away"
			go away
		else
			send the first chat of the first chat window message "/nick stephdau"
			go available
		end if
	end tell
end if

-- Skype status
if appIsRunning("Skype") then
	tell application "Skype"
		if the button returned of myStatus is "Away" then
			send command "SET USERSTATUS AWAY" script name "My Script"
		else
			send command "SET USERSTATUS ONLINE" script name "My Script"
		end if
	end tell
end if

-- iTunes
if appIsRunning("iTunes") then
	tell application "iTunes"
		if the button returned of myStatus is "Away" then
			pause
		else
			play
		end if
	end tell
end if

-- Helper
on appIsRunning(appName)
	tell application "System Events" to (name of processes) contains appName
end appIsRunning

Note on Adium handling: because of my account order and the fact that I connect to IRC via ZNC, the first chat of the first chat window is always an IRC room in my context.

I haven’t yet, but I could adapt this script to also take parameters to get the button status equivalent, then couple it with SleepWatcher or ScriptSaver to have the script triggered on sleep/wake on my MacBook Pro or when the screensaver activates/deactivates on my iMac.