tweetline 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/lib/tweetline/cli.rb +7 -9
- data/tweetline.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -30,6 +30,7 @@ This is a reasonably useful version of a Twitter commandline tool with much more
|
|
30
30
|
|
31
31
|
tl cat [ID] # Display the details of a tweet with responses based on twitter id or piped in tweets.
|
32
32
|
tl follow [SCREEN_NAME] # Follows the twitter user based on their screen name or piped in tweets.
|
33
|
+
tl grep PATTERN # Display tweets matching pattern.
|
33
34
|
tl help [TASK] # Describe available tasks or one specific task
|
34
35
|
tl json # Lists tweets from the timeline in JSON format.
|
35
36
|
tl ls [SCREEN_NAME] # Lists tweets from the timeline.
|
data/lib/tweetline/cli.rb
CHANGED
@@ -4,6 +4,10 @@ module Tweetline
|
|
4
4
|
super
|
5
5
|
Tweetline.configure_twitter
|
6
6
|
Tweetline.configure_pipes
|
7
|
+
|
8
|
+
Signal.trap("SIGINT") do
|
9
|
+
exit!
|
10
|
+
end
|
7
11
|
end
|
8
12
|
|
9
13
|
default_task :ls
|
@@ -95,23 +99,17 @@ module Tweetline
|
|
95
99
|
method_option :follow, :type => :boolean, :aliases => "-f", :defatul => false, :banner => "Continue following tweets as they are added."
|
96
100
|
method_option :number, :type => :numeric, :aliases => "-n", :default => 10, :banner => "Specifies the number of tweets to display."
|
97
101
|
def tail
|
98
|
-
opts = options.dup
|
99
|
-
|
100
|
-
Signal.trap("SIGINT") do
|
101
|
-
exit!
|
102
|
-
end
|
103
|
-
|
104
102
|
previous_id = "1"
|
105
103
|
begin
|
106
|
-
tweets = Twitter.home_timeline(:count =>
|
104
|
+
tweets = Twitter.home_timeline(:count => options[:number], :since_id => previous_id) rescue []
|
107
105
|
tweets.reverse_each do |tweet|
|
108
106
|
Tweetline.put_tweet(tweet.id, tweet.created_at, tweet.user.name, tweet.user.screen_name, tweet.text)
|
109
107
|
previous_id = tweet.id
|
110
108
|
end
|
111
109
|
|
112
|
-
sleep(30) if
|
110
|
+
sleep(30) if options[:follow]
|
113
111
|
|
114
|
-
end while
|
112
|
+
end while options[:follow]
|
115
113
|
end
|
116
114
|
|
117
115
|
desc "unfollow [SCREEN_NAME]", "Unfollows the twitter user based on their screen name or piped in tweets."
|
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.
|
4
|
+
s.version = "0.0.6"
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Anthony Crumley
|