tweetline 0.0.4 → 0.0.5

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 the initial proof of concept for a twitter command line tool. Now that I understand the problem, I am currently in the process of writing a more robust implementation.
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.
2
2
 
3
3
  == Getting Started
4
4
 
@@ -23,6 +23,9 @@ This is the initial proof of concept for a twitter command line tool. Now that
23
23
  DHH (@dhh) [04/02/11 11:43 AM]
24
24
  I've tried many answers for "what do you get out of working on open source?", but the truth is the act of creation is its own reward. (54222543829213184)
25
25
 
26
+ Anthony Crumley (@anthonycrumley) [04/08/11 10:41 PM]
27
+ Writing code for the fun of it is its own reward. When we create for the joy of creating we imitate our creator. (56562348806242304)
28
+
26
29
  == Tasks
27
30
 
28
31
  tl cat [ID] # Display the details of a tweet with responses based on twitter id or piped in tweets.
data/lib/tweetline/cli.rb CHANGED
@@ -32,6 +32,16 @@ module Tweetline
32
32
  end
33
33
  end
34
34
 
35
+ desc "grep PATTERN", "Display tweets matching pattern."
36
+ def grep(pattern)
37
+ Tweetline.each_tweet do |tweet|
38
+ regex = Regexp.new(pattern)
39
+ if regex =~ tweet["name"] or regex =~ tweet["screen_name"] or regex =~ tweet["text"]
40
+ Tweetline.put_tweet(tweet["id"], tweet["created_at"], tweet["name"], tweet["screen_name"], tweet["text"])
41
+ end
42
+ end
43
+ end
44
+
35
45
  desc "json", "Lists tweets from the timeline in JSON format."
36
46
  def json
37
47
  Tweetline.each_tweet do |tweet|
@@ -48,13 +58,6 @@ module Tweetline
48
58
  end
49
59
  end
50
60
 
51
- desc "raw", "Raw output for testing."
52
- def raw
53
- STDIN.each do |text|
54
- puts text
55
- end
56
- end
57
-
58
61
  desc "retweet [ID]", "Retweets the tweet by the Twitter id or a group of piped in tweets."
59
62
  def retweet(twitter_id = "")
60
63
  if twitter_id.strip.length > 0
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"
4
+ s.version = "0.0.5"
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
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-09 00:00:00 -05:00
18
+ date: 2011-04-10 00:00:00 -05:00
19
19
  default_executable: tl
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency