Sha256: 165936302e151341e84f91e570d6dcefb60fc2a3b6b27324e69441827e3928da

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

require 'rubygems'
require 'tweetstream'
require 'ruby-growl'

if args_start = ARGV.index('--')
  username, password = ARGV[args_start + 1].split(':')
  tracks = ARGV[args_start + 2 .. -1]
  puts "Starting a GrowlTweet to track: #{tracks.inspect}"
end

TweetStream.configure do |config|
  config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
  config.consumer_secret = '0123456789'
  config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
  config.oauth_token_secret = '0123456789'
  config.auth_method = :oauth
end

TweetStream::Daemon.new('tracker').track(*tracks) do |status|
  g = Growl.new 'localhost', 'growltweet', ['tweet']
  g.notify 'tweet', status.user.screen_name, status.text
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tweetstream-1.1.1 examples/growl_daemon.rb
tweetstream-1.1.0 examples/growl_daemon.rb
tweetstream-1.1.0.rc2 examples/growl_daemon.rb