Created
May 27, 2009 17:02
-
-
Save closer/118752 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "kconv" | |
require "rubygems" | |
require "twitter" | |
require "mixi" | |
username = '' | |
password = '' | |
httpauth = Twitter::HTTPAuth.new(username, password) | |
twitter = Twitter::Base.new(httpauth) | |
todays_timeline = [] | |
twitter.user_timeline({:count => 200}).each do |line| | |
todays_timeline.push(line.text) if DateTime.parse(line.created_at) > DateTime.now - 1 | |
end | |
todays_timeline.reverse! | |
puts body = todays_timeline.join("\n") | |
con = Mixi::Connection.new(:email => '', :password => '') | |
con.login_user.add_diary('Twiter', body.toeuc) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment