friendfeed 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +8 -0
  2. data/VERSION +1 -1
  3. data/bin/tw2ff +27 -12
  4. data/friendfeed.gemspec +1 -1
  5. metadata +1 -1
@@ -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.10
1
+ 0.1.11
data/bin/tw2ff CHANGED
@@ -176,8 +176,8 @@ EOF
176
176
  end
177
177
  end
178
178
 
179
- mode 'sync' do
180
- description 'Add imaginary friends for Twitter-only friends'
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 'likes' do
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 for Twitter replies from non-friends'
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 'Specifies a flie to write RSS to'
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 from non-friends'
409
+ rss.channel.title = 'Twitter replies'
395
410
  rss.channel.link = 'http://twitter.com/replies'
396
- rss.channel.description = 'Twitter replies from non-friends'
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
- #next if friends.include?(name.downcase)
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 'Specifies a flie to write RSS to'
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 'Refresh the user services'
502
+ description 'Urge FriendFeed to refresh services (import feed entries)'
488
503
 
489
504
  def run
490
505
  ffcli = friendfeed_client()
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{friendfeed}
8
- s.version = "0.1.10"
8
+ s.version = "0.1.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Akinori MUSHA"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: friendfeed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA