#!/usr/bin/env ruby
#
#  tw2td.rb - 過去のツイートを取得し、tDiary にポストするスクリプト
#
#   (c) 2012, Norihisa Washitake http://washitake.com/diary/public/
#

$_cache_filename = File::dirname($0) + "/.tw2tdiary_cache"

def read_cache()
  fh = open($_cache_filename)
  id = fh.gets.to_i
  fh.close
  return id
end

def update_cache(id)
  fh = open($_cache_filename, "w")
  fh.puts id
  fh.close
end
