tweet-tweet

tweet-tweet is a little script/utility that, when run, will perform any user-defined functions such as popping up new tweets via Growl/etc

Install

$ sudo gem sources --add http://gems.github.com
$ sudo gem install remi-tweet-tweet

Usage

$ tweet-tweet

The first time tweet-tweet is run, it'll ask you for your twitter username and password.

Your username/password are encrypted and stored in ~/.tweettweet/auth

To manually set your username/password or reset them, run:

$ tweet-tweet-setup

How does it work?

the idea is really simple. the latest tweets get passed to user-defined functions (which you can define in your ~/.tweettweetrc

to use the functions that come out-of-the-box with tweet-tweet, you can simply require them in your ~/.tweettweetrc, like so:

require 'tweet-tweet/growl'   # growl tweeter hasn't been implemented yet
require 'tweet-tweet/gnome'

def print_tweet tweet
  puts "#{ tweet.user.name }: #{ tweet.text }"
end    

TweetTweet.tweeters << :print_tweet

TweetTweet.tweeters << lambda { |tweet| puts "#{ tweet.user.name } says '#{ tweet.text }'" }

if you don't put anything in ~/.tweettweetrc, 'tweet-tweet/echo' will automatically be required (a simple 'tweeter' which simply prints out the tweets)

tweet-tweet stores your latest tweets in ~/.tweettweet as well as resources like local copies of users' avatars

to run tweet-tweet once, simply:

$ tweet-tweet

for now, i'm not writing a deamon for tweet-tweet. it's recommended to run tweet-tweet via watch. to run once every minute:

$ watch -n 60 tweet-tweet

if you have screen installed, you can deamonize tweet-tweet:

$ screen -dmS tweettweet watch -n 60 tweet-tweet