Created
September 30, 2011 18:39
-
-
Save krames/1254609 to your computer and use it in GitHub Desktop.
Read My Tweets
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
#!/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