Permalink
Browse files

Make it use Imaginary Friends again instead of private groups.

  • Loading branch information...
1 parent 541a783 commit 0b1271bc53d64d874b362912ca2b78315598449f @knu knu committed May 15, 2009
Showing with 11 additions and 16 deletions.
  1. +11 −16 samples/tw2ff
View
@@ -205,22 +205,17 @@ Main {
agent = WWW::Mechanize.new
to_subscribe.each { |name|
- putinfo 'Creating a private group for %s', name
- uid = Digest::SHA1.hexdigest('%s:twitter:%s' % [Config('friendfeed.username'), name])[0...20]
- begin
- id = ffcli.create_group(uid, '(%s)' % name)
- ffcli.add_twitter(id, name)
- if picture_urls.key?(name)
- putinfo 'Setting the picture of %s', name
- t = Tempfile.open("picture")
- t.write agent.get_file(picture_urls[name])
- t.close
- File.open(t.path) { |f|
- ffcli.change_picture(id, f)
- }
- end
- rescue => e
- p e
+ putinfo 'Creating an imaginary friend for %s', name
+ id = ffcli.create_imaginary_friend('(%s)' % name)
+ ffcli.add_twitter(id, name)
+ if picture_urls.key?(name)
+ putinfo 'Setting the picture of %s', name
+ t = Tempfile.open("picture")
+ t.write agent.get_file(picture_urls[name])
+ t.close
+ File.open(t.path) { |f|
+ ffcli.change_picture(id, f)
+ }
end
}
end

0 comments on commit 0b1271b

Please sign in to comment.