This file contains hidden or 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
| # coding: utf-8 | |
| require 'rubygems' | |
| require 'twitter' | |
| CONSUMER_KEY = 'APIキー' | |
| CONSUMER_SECRET = 'APIシークレットキー' | |
| ACCESS_TOKEN = 'アクセストークン' | |
| ACCESS_TOKEN_SECRET = 'アクセストークンシークレット' | |
| client = Twitter::REST::Client.new do |config| |
This file contains hidden or 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
| # coding: utf-8 | |
| require "rubygems" | |
| require "nokogiri" | |
| require "open-uri" | |
| require "kconv" | |
| require "time" | |
| def tenki | |
| time = Time.new | |
| doc = Nokogiri::HTML(open("http://tenki.jp/forecast/point-702.html")) |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| Plugin.create(:fackin_hot) do | |
| on_appear do |ms| | |
| ms.each do |m| | |
| if m.message.to_s =~ /^暑い/ | |
| str = "@#{m.user.idname}" + " ファッキンホット" | |
| Service.primary.post(:message => str, :replyto => m) | |
| end | |
| end |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| Plugin.create :nice_rock do | |
| on_appear do |ms| | |
| ms.each do |m| | |
| if m.message.to_s =~ /ロックスター/ | |
| str ="@#{m.user.idname}" + " ナイスロック" | |
| Service.primary.post(:message => str, :replyto => m) | |
| end | |
| end | |
| end |
NewerOlder