public
Rubygem
Description: command line tweets and an api wrapper for twitter
Homepage: http://twitter.rubyforge.org/
Clone URL: git://github.com/jnunemaker/twitter.git
Search Repo:
Click here to lend your support to: twitter and make a donation at www.pledgie.com !
jnunemaker (author)
Wed Jul 23 20:01:38 -0700 2008
commit  25f5b088988f7a669dd4e29edcc99f6773e3be40
tree    201d10f7315a2d4cccceda0e842a274eb32a1079
parent  918044ef0283df5b6e91b2a8dc0948cba7c07d8f
twitter / bin / twitter
100644 15 lines (12 sloc) 0.414 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby
 
# if we have stdin, let's prepend it to the message for post
if ARGV[0] && ARGV[0] == 'post' && !STDIN.tty?
  ARGV[1] = "#{STDIN.read}#{ARGV[1]}"
end
 
# if we have stdin, let's prepend it to the message for d
if ARGV[0] && ARGV[0] == 'd' && !STDIN.tty?
  ARGV[2] = "#{STDIN.read}#{ARGV[2]}"
end
 
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'twitter'
require 'twitter/cli'