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 !
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'