Created
November 8, 2012 16:53
-
-
Save kkosuge/4040028 to your computer and use it in GitHub Desktop.
ディスプレイの前でニヤニヤしてる人たちをカメラで撮る仕組み.rb
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
# coding: utf-8 | |
require "chatroid" | |
Chatroid.new do | |
set :service, "Twitter" | |
set :consumer_key, "..." | |
set :consumer_secret, "..." | |
set :access_key, "..." | |
set :access_secret, "..." | |
on_tweet do |event| | |
if event["text"] =~ /笑(?:った|ってる|いが止まらない)/ | |
`imagesnap` | |
end | |
end | |
end.run! | |
# 1. imagesnapをダウンロードして適当にパスを通してください | |
# https://github.com/aw/imagesnap | |
# | |
# 2. スクリプトを起動してください | |
# $ gem install chatroid | |
# $ ruby ディスプレイの前でニヤニヤしてる人たちをカメラで撮る仕組み.rb | |
# | |
# 3. 笑ってつぶやいてください | |
# ʅ(´◔౪◔)ʃ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment