friendfeed 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +8 -0
- data/VERSION +1 -1
- data/bin/tw2ff +27 -12
- data/friendfeed.gemspec +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This is a Ruby library to provide access to FriendFeed API's.
|
4
4
|
|
5
|
+
== tw2ff
|
6
|
+
|
7
|
+
A tool to help your FriendFeed life much easier in terms of
|
8
|
+
integration with Twitter.
|
9
|
+
|
10
|
+
Run "tw2ff help" to get the list of subcommands, and "tw2ff
|
11
|
+
<subcommand> --help" for the usage of each subcommands.
|
12
|
+
|
5
13
|
== Copyright
|
6
14
|
|
7
15
|
Copyright (c) 2009, 2010 Akinori MUSHA. See LICENSE for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
data/bin/tw2ff
CHANGED
@@ -176,8 +176,8 @@ EOF
|
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
179
|
-
mode '
|
180
|
-
description '
|
179
|
+
mode 'friends' do
|
180
|
+
description 'Import Twitter-only friends to FriendFeed as "imaginary friends"'
|
181
181
|
|
182
182
|
def run
|
183
183
|
require 'set'
|
@@ -307,12 +307,11 @@ EOF
|
|
307
307
|
end
|
308
308
|
end
|
309
309
|
|
310
|
-
mode '
|
310
|
+
mode 'favorites' do
|
311
311
|
description 'Synchronize Twitter favorites and FriendFeed likes as far as possible'
|
312
312
|
|
313
313
|
def run
|
314
314
|
require 'set'
|
315
|
-
require 'pp'
|
316
315
|
|
317
316
|
ffcli = friendfeed_client()
|
318
317
|
ff_me = ffcli.nickname
|
@@ -375,10 +374,24 @@ EOF
|
|
375
374
|
end
|
376
375
|
|
377
376
|
mode 'replies' do
|
378
|
-
description 'Produce an RSS feed
|
377
|
+
description 'Produce an RSS feed of Twitter @replies'
|
378
|
+
|
379
|
+
option('include-friends') {
|
380
|
+
description 'Include @reples from friends'
|
381
|
+
|
382
|
+
cast :bool
|
383
|
+
default false
|
384
|
+
}
|
385
|
+
|
386
|
+
option('include-protected') {
|
387
|
+
description 'Include @reples from protected users'
|
388
|
+
|
389
|
+
cast :bool
|
390
|
+
default false
|
391
|
+
}
|
379
392
|
|
380
393
|
argument('filename') {
|
381
|
-
description '
|
394
|
+
description 'Output RSS to this file'
|
382
395
|
}
|
383
396
|
|
384
397
|
def run
|
@@ -387,21 +400,23 @@ EOF
|
|
387
400
|
require 'set'
|
388
401
|
require 'time'
|
389
402
|
|
403
|
+
include_friends = params['include-friends'].value
|
404
|
+
include_protected = params['include-protected'].value
|
390
405
|
filename = params['filename'].value
|
391
406
|
|
392
407
|
File.open(filename, 'w') { |w|
|
393
408
|
feed = RSS::Maker.make("2.0") { |rss|
|
394
|
-
rss.channel.title = 'Twitter replies
|
409
|
+
rss.channel.title = 'Twitter replies'
|
395
410
|
rss.channel.link = 'http://twitter.com/replies'
|
396
|
-
rss.channel.description = 'Twitter replies
|
411
|
+
rss.channel.description = 'Twitter replies'
|
397
412
|
|
398
413
|
friends = Status('friends').to_set
|
399
414
|
|
400
415
|
twitter_client().mentions.each { |reply|
|
401
416
|
user = reply.user
|
402
|
-
next if user.protected
|
417
|
+
next if !include_protected && user.protected
|
403
418
|
name = user.screen_name
|
404
|
-
|
419
|
+
next if !include_friends && friends.include?(name.downcase)
|
405
420
|
text = '%s: %s' % [name, reply.text]
|
406
421
|
url = 'http://twitter.com/%s/statuses/%d' % [name, reply.id]
|
407
422
|
timestamp = Time.parse(reply.created_at)
|
@@ -422,7 +437,7 @@ EOF
|
|
422
437
|
description 'Produce an RSS feed for Twitter entries from protected friends'
|
423
438
|
|
424
439
|
argument('filename') {
|
425
|
-
description '
|
440
|
+
description 'Output RSS to this file'
|
426
441
|
}
|
427
442
|
|
428
443
|
def run
|
@@ -484,7 +499,7 @@ EOF
|
|
484
499
|
end
|
485
500
|
|
486
501
|
mode 'refresh' do
|
487
|
-
description '
|
502
|
+
description 'Urge FriendFeed to refresh services (import feed entries)'
|
488
503
|
|
489
504
|
def run
|
490
505
|
ffcli = friendfeed_client()
|
data/friendfeed.gemspec
CHANGED