Created
May 21, 2012 12:22
-
-
Save ompugao/2762091 to your computer and use it in GitHub Desktop.
earthquake growl notify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruby_gntp' | |
Earthquake.init do | |
output do |item| | |
next unless item["_stream"] | |
if item["text"] | |
GNTP.notify({:app_name => "earthquake",:title => item["user"]["screen_name"],:text => item["text"],:icon => item["user"]["profile_image_url"]})#icon_path(user.screen_name, user.profile_image_url) }) | |
#if /@sifikinoko(?:[\s:]|$)/ =~ item["text"] | |
# system{ | |
# 'notify-send', | |
# '--urgency','critical', | |
# item["user"]["screen_name"], | |
# item["text"] | |
# } | |
#end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment