Changeset 19027 for lang/ruby

Show
Ignore:
Timestamp:
09/09/08 02:10:22 (2 months ago)
Author:
drry
Message:
  • fixed a regexp.
  • et cetera.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/misc/gdmng_twitter.rb

    r14262 r19027  
    22# -*- coding: utf-8 -*- 
    33 
    4 # 起床の通知をtwitterとhatena graphにマルチポストするクライアントスクリプト 
     4# 起床の通知をTwitterとhatena graphにマルチポストするクライアントスクリプト 
    55# おきた or 起きたでマルチポスト 
    6 # それ以外は普通のtwitter postクライアント 
     6# それ以外は普通のTwitter postクライアント 
    77 
    88require 'net/http' 
     
    1212 
    1313twitter_config = Pit.get("twitter.com", :require => { 
    14                    "username" => "your email in twitter", 
    15                    "password" => "your password in twitter", 
     14                   "username" => "your email in Twitter", 
     15                   "password" => "your password in Twitter", 
    1616                 }) 
    17 hatena_config = Pit.get("hatena", :require => { 
     17hatena_config  = Pit.get("hatena", :require => { 
    1818                   "username" => "your email in hatena", 
    1919                   "password" => "your password in hatena", 
     
    3939end 
    4040 
    41 if !hatena_config["username"].empty? && status_utf8 =~ /^.*(起きた|おきた).*$/ 
     41if !hatena_config["username"].empty? && status_utf8 =~ /^.*[起お]きた.*$/ 
    4242  graph = Hatena::API::Graph.new(hatena_config["username"], hatena_config["password"]) 
    4343  wakeup_time = time2float