tweetline 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- This is a reasonably useful version of a Twitter commandline tool with much more functionality to come. The biggest part that is missing currently is seemless authentication with Twitter's xAuth, which will be added once they approve the request.
1
+ This is a reasonably useful version of a Twitter commandline tool with much more functionality to come.
2
2
 
3
3
  == Getting Started
4
4
 
@@ -6,12 +6,21 @@ This is a reasonably useful version of a Twitter commandline tool with much more
6
6
 
7
7
  gem install tweetline
8
8
 
9
- 2. Until Twitter approves xAuth for Tweetline, you will have to create a ~/.tweetlinerc yaml file with your authentication credentials like the following...
9
+ 2. Authorize your account through twitter:
10
10
 
11
- :consumer_key: "your-key"
12
- :consumer_secret: "your-secret"
13
- :oauth_token: "your-token"
14
- :oauth_token_secret: "your-secret"
11
+ :~$ tl
12
+
13
+ Follow these steps to access your twitter account.
14
+
15
+ 1) Navigate to the following url...
16
+
17
+ http://bit.ly/<token>
18
+
19
+ 2) Allow Tweet-line access to your twitter account...
20
+
21
+ 3) Enter your pin number...
22
+
23
+ < insert PIN here >
15
24
 
16
25
  3. Enter commands with tl:
17
26
 
@@ -34,6 +43,7 @@ This is a reasonably useful version of a Twitter commandline tool with much more
34
43
  tl help [TASK] # Describe available tasks or one specific task
35
44
  tl json # Lists tweets from the timeline in JSON format.
36
45
  tl ls [SCREEN_NAME] # Lists tweets from the timeline.
46
+ tl reply ID, REPLY # Replies to the specified tweet with @screenname at the beginning.
37
47
  tl retweet [ID] # Retweets the tweet by the Twitter id or a group of piped in tweets.
38
48
  tl rm [ID] # Removes the tweet by it's id or a list of piped in tweets.
39
49
  tl say # Speaks the tweet at the top of your timeline.
data/lib/tweetline/cli.rb CHANGED
@@ -62,6 +62,20 @@ module Tweetline
62
62
  end
63
63
  end
64
64
 
65
+ desc "reply ID, REPLY", "Replies to the specified tweet with @screenname at the beginning."
66
+ def reply(twitter_id, status)
67
+ status = "@#{Twitter.status(twitter_id).user.screen_name} #{status}"
68
+ if status.length > 140
69
+ puts ""
70
+ puts "This status is too long."
71
+ puts ""
72
+ puts " #{status[0..139]}"
73
+ puts ""
74
+ else
75
+ Twitter.update(status, :in_reply_to_status_id => twitter_id)
76
+ end
77
+ end
78
+
65
79
  desc "retweet [ID]", "Retweets the tweet by the Twitter id or a group of piped in tweets."
66
80
  def retweet(twitter_id = "")
67
81
  if twitter_id.strip.length > 0
@@ -96,12 +110,21 @@ module Tweetline
96
110
  end
97
111
 
98
112
  desc "tail", "Displays recent tweets in chronological order."
99
- method_option :follow, :type => :boolean, :aliases => "-f", :defatul => false, :banner => "Continue following tweets as they are added."
100
- method_option :number, :type => :numeric, :aliases => "-n", :default => 10, :banner => "Specifies the number of tweets to display."
113
+ method_option :follow, :type => :boolean, :aliases => "-f", :default => false, :banner => "Continue following tweets as they are added."
114
+ method_option :number, :type => :numeric, :aliases => "-n", :default => 10, :banner => "Specifies the number of tweets to display. This option is ignored if the follow option is true."
101
115
  def tail
102
116
  previous_id = "1"
103
117
  begin
104
- tweets = Twitter.home_timeline(:count => options[:number], :since_id => previous_id) rescue []
118
+ if options[:follow]
119
+ if previous_id == "1"
120
+ count = 1
121
+ else
122
+ count = 100
123
+ end
124
+ else
125
+ count = options[:number]
126
+ end
127
+ tweets = Twitter.home_timeline(:count => count, :since_id => previous_id) rescue []
105
128
  tweets.reverse_each do |tweet|
106
129
  Tweetline.put_tweet(tweet.id, tweet.created_at, tweet.user.name, tweet.user.screen_name, tweet.text)
107
130
  previous_id = tweet.id
data/tweetline.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = "tweetline"
4
- s.version = "0.0.7"
4
+ s.version = "0.0.8"
5
5
  s.summary = "Command line client for Twitter."
6
6
  s.description = "Tweetline is a command line Twitter client for those who can't imagine a better interface to anything than the command line. Also, some folks may find it useful for automating Twitter interactions."
7
7
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetline
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anthony Crumley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-23 00:00:00 -05:00
18
+ date: 2011-05-13 00:00:00 -05:00
19
19
  default_executable: tl
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency