summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blatweet.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/blatweet.rb b/blatweet.rb
index 46b2112..fd9106c 100644
--- a/blatweet.rb
+++ b/blatweet.rb
@@ -5,6 +5,7 @@ require 'optparse'
username = nil
number_of_tweets = 1
output = []
+version = 1.03
STDIN.gets.split(' ').each{|arg| ARGV << arg} if ARGV == []
args = ARGV.dup
@@ -14,6 +15,8 @@ options = OptionParser.new do |opts|
opts.on( "-u", "--username USERNAME", "Twitter username to search for." ) { |u| username = u }
opts.on( "-n", "--number NO_OF_TWEETS", "Number of tweets to return." ) { |n| number_of_tweets = n }
opts.on( '-h', '--help', 'Display this screen' ) { puts opts; exit }
+ opts.on( '-l', '--limit', 'Display remaining hits' ) { puts Twitter.rate_limit_status.remaining_hits.to_s + " tweets remaining."; exit }
+ opts.on( '-v', '--version', 'Display program version' ) { puts version }
end;options.parse!
if args == []