Skip to content

Instantly share code, notes, and snippets.

@closer
Created May 27, 2009 17:02
Show Gist options
  • Save closer/118752 to your computer and use it in GitHub Desktop.
Save closer/118752 to your computer and use it in GitHub Desktop.
#!/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