Skip to content

Instantly share code, notes, and snippets.

@krames
Created September 30, 2011 18:39
Show Gist options
  • Save krames/1254609 to your computer and use it in GitHub Desktop.
Save krames/1254609 to your computer and use it in GitHub Desktop.
Read My Tweets
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
abort("I can't let you do that Dave!") unless RUBY_PLATFORM =~ /darwin/
def remove_urls(tweet)
tweet.text.gsub(/http:\/\/[^ ]+/, '')
end
feed = Twitter.user_timeline("krames")
feed.each do |tweet|
text = remove_urls tweet
puts "TWEET>> #{text}"
`say "#{text}"`
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment