Project

shiki

0.0
No commit activity in last 3 years
No release in over 3 years
The "Unidentified" Bot Framework
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0
>= 0
>= 0
 Project Readme

式(Shiki) beta

Shiki is The "Unidentified" Bot Framework for Twitter, written in Ruby.

Features / Problems

  • Easy to write.

Requirement

  • pupil, json and oauth gem
  • Ruby 1.9.x

Installation

gem install shiki

Examples

require "shiki"

OAUTH_KEY = {
	:consumer_key => "something",   	# Required
	:consumer_secret => "something"		# Required
	:access_token => "something",       # Required
	:access_token_secret => "something" # Required
}

class Merry < Shiki::Base
  set :oauth_key, OAUTH_KEY
  
  use :memory, :database => "databases/memory/memory.db"
  
  event :mention do |status|
    user = memory.remember :person => status.user
    if user.replied_average_time < 40
      tweet = "頻繁にリプ飛ばしてくるの、正直鬱陶しいんです。やめてください"
      status.user.reply(tweet)
    end
  end
end

merry = Merry.new
merry.run

Credits

Developer: Oame

License

Copyright (c) 2011 Oame. See LICENSE.txt for further details.