DougSchmidt
1 post
|
Topic: MK&C /
Hack: Get better Growl messages w/ Campfire content
Until the next version of Pyro is released (if ever!), here’s a workaround that adds better Growl messages, with the content of the actual chat, rather than just a generic “go check the campfire” message.
This 1) Disable Pyro Growl notifications 2) Install ruby-growl and tinder gems. So from a Terminal window, enter the following. Gem will ask you some questions, so just hit Enter to accept the defaults. sudo gem install ruby-growl sudo gem install tinder 3) In the Growl Network preferences tab, enable “Listen for incoming notifications” and “Allow remote application registration”, and enter a password (called the UDP password elsewhere) 4) Save the CampfireGrowler.rb ruby script (see below) 5) Edit the ruby script with your actual Campfire account credentials and room name 6) Run the Ruby script. So, from Terminal, enter: ruby CampfireGrowler.rb 7) Let this script run in the background, and viola! Your growl messages have the content you want!
Cheers, Doug
http://olddougnewtricks.blogspot.com // Start of CampfireGrowler.rb require ‘rubygems’ require ‘ruby-growl’ require ‘tinder’
growler = Growl.new “localhost”, “ruby-growl”, [“ruby-growl Notification”], nil, “your UDP growl password”
campfire = Tinder::Campfire.new ‘yourCampfireSubdomain’ campfire.login ‘you@yourdomain’, ‘campfirePassword’ room = campfire.find_room_by_name ‘your campfire room name’
room.listen do |m|
if !m.nil? and m[:message].size > 1
growler.notify “ruby-growl Notification”, m[:person] + ” @ ” + room.name, m[:message]
end end
|