t 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +27 -27
- data/lib/t/cli.rb +1 -1
- data/lib/t/version.rb +1 -1
- data/spec/cli_spec.rb +443 -981
- data/spec/delete_spec.rb +43 -99
- data/spec/helper.rb +6 -0
- data/spec/list_spec.rb +69 -151
- data/spec/rcfile_spec.rb +66 -66
- data/spec/search_spec.rb +126 -280
- data/spec/set_spec.rb +28 -52
- data/spec/stream_spec.rb +33 -33
- data/spec/utils_spec.rb +21 -21
- metadata +2 -2
data/README.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
# Twitter CLI
|
6
6
|
[][travis]
|
7
7
|
[][gemnasium]
|
8
|
-
[][pledgie]
|
9
9
|
|
10
|
-
|
10
|
+
#### A command-line power tool for Twitter.
|
11
11
|
|
12
12
|
The CLI takes syntactic cues from the [Twitter SMS commands][sms], however it
|
13
13
|
offers vastly more commands and capabilities than are available via SMS.
|
@@ -97,7 +97,7 @@ TASK` to get help for a specific command.
|
|
97
97
|
|
98
98
|
t help
|
99
99
|
|
100
|
-
|
100
|
+
#### Update your status
|
101
101
|
t update "I'm tweeting from the command line. Isn't that special?"
|
102
102
|
|
103
103
|
**Note**: If your tweet includes special characters (e.g. `!`), make sure to
|
@@ -105,16 +105,16 @@ wrap it in single quotes instead of double quotes, so those characters are not
|
|
105
105
|
interpreted by your shell. (However, if you use single quotes, your Tweet
|
106
106
|
obviously can't contain any apostrophes.)
|
107
107
|
|
108
|
-
|
108
|
+
#### Retrieve detailed information about a Twitter user
|
109
109
|
t whois @sferik
|
110
110
|
|
111
|
-
|
111
|
+
#### Retrieve stats for multiple users
|
112
112
|
t users -l @sferik @gem
|
113
113
|
|
114
|
-
|
114
|
+
#### Follow users
|
115
115
|
t follow @sferik @gem
|
116
116
|
|
117
|
-
|
117
|
+
#### Check whether one user follows another
|
118
118
|
t does_follow @ev @sferik
|
119
119
|
|
120
120
|
**Note**: If the first user does not follow the second, `t` will exit with a
|
@@ -123,64 +123,64 @@ example, send a user a direct message only if he already follows you:
|
|
123
123
|
|
124
124
|
t does_follow @ev && t dm @ev "What's up, bro?"
|
125
125
|
|
126
|
-
|
126
|
+
#### Create a list for everyone you're following
|
127
127
|
t list create following-`date "+%Y-%m-%d"`
|
128
128
|
|
129
|
-
|
129
|
+
#### Add everyone you're following to that list (up to 500 users)
|
130
130
|
t followings | xargs t list add following-`date "+%Y-%m-%d"`
|
131
131
|
|
132
|
-
|
132
|
+
#### List all the members of a list, in long format
|
133
133
|
t list members -l following-`date "+%Y-%m-%d"`
|
134
134
|
|
135
|
-
|
135
|
+
#### List all your lists, in long format
|
136
136
|
t lists -l
|
137
137
|
|
138
|
-
|
138
|
+
#### List all your friends, in long format, ordered by number of followers
|
139
139
|
t friends -l --sort=followers
|
140
140
|
|
141
|
-
|
141
|
+
#### List all your leaders (people you follow who don't follow you back)
|
142
142
|
t leaders -l --sort=followers
|
143
143
|
|
144
|
-
|
144
|
+
#### Unfollow everyone you follow who doesn't follow you back
|
145
145
|
t leaders | xargs t unfollow
|
146
146
|
|
147
|
-
|
147
|
+
#### Unfollow 10 people who haven't tweeted in the longest time
|
148
148
|
t followings -l --sort=tweeted | head -10 | awk '{print $1}' | xargs t unfollow
|
149
149
|
|
150
|
-
|
150
|
+
#### Twitter roulette: randomly follow someone who follows you (who you don't already follow)
|
151
151
|
t groupies | shuf | head -1 | xargs t follow
|
152
152
|
|
153
|
-
|
153
|
+
#### Favorite the last 10 tweets that mention you
|
154
154
|
t mentions -n 10 -l | awk '{print $1}' | xargs t favorite
|
155
155
|
|
156
|
-
|
156
|
+
#### Output the last 200 tweets in your timeline to a CSV file
|
157
157
|
t timeline -n 200 --csv > timeline.csv
|
158
158
|
|
159
|
-
|
159
|
+
#### Start streaming your timeline (Control-C to stop)
|
160
160
|
t stream timeline
|
161
161
|
|
162
|
-
|
162
|
+
#### Count the number of employees who work for Twitter
|
163
163
|
t list members twitter team | wc -l
|
164
164
|
|
165
|
-
|
165
|
+
#### Search Twitter for the 20 most recent Tweets that match a specified query
|
166
166
|
t search all "query"
|
167
167
|
|
168
|
-
|
168
|
+
#### Download the latest Linux kernel via BitTorrent (possibly NSFW, depending where you work)
|
169
169
|
t search all "lang:en filter:links linux torrent" -n 1 | grep -o "http://t.co/[0-9A-Za-z]*" | xargs open
|
170
170
|
|
171
|
-
|
171
|
+
#### Search Tweets you've favorited that match a specified query
|
172
172
|
t search favorites "query"
|
173
173
|
|
174
|
-
|
174
|
+
#### Search Tweets mentioning you that match a specified query
|
175
175
|
t search mentions "query"
|
176
176
|
|
177
|
-
|
177
|
+
#### Search Tweets you've retweeted that match a specified query
|
178
178
|
t search retweets "query"
|
179
179
|
|
180
|
-
|
180
|
+
#### Search Tweets in your timeline that match a specified query
|
181
181
|
t search timeline "query"
|
182
182
|
|
183
|
-
|
183
|
+
#### Search Tweets in another user's timeline that match a specified query
|
184
184
|
t search timeline @sferik "query"
|
185
185
|
|
186
186
|
## Features
|
data/lib/t/cli.rb
CHANGED
@@ -97,7 +97,7 @@ module T
|
|
97
97
|
Launchy.open(url, :dry_run => options['display-url'])
|
98
98
|
pin = ask "Enter the supplied PIN:"
|
99
99
|
access_token = request_token.get_access_token(:oauth_verifier => pin.chomp)
|
100
|
-
oauth_response = access_token.get('/1/account/verify_credentials.json')
|
100
|
+
oauth_response = access_token.get('/1.1/account/verify_credentials.json?include_entities=false&skip_status=true')
|
101
101
|
screen_name = oauth_response.body.match(/"screen_name"\s*:\s*"(.*?)"/).captures.first
|
102
102
|
@rcfile[screen_name] = {
|
103
103
|
key => {
|