Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6dd3d08
Showing
7 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source "http://rubygems.org" | ||
|
||
# Specify your gem's dependencies in siriproxy-example.gemspec | ||
gemspec |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This plugin is pretty simple and easy to use. Add the appropriate settings from the config-info.yml into your ~/.siriproxy/config.yml and bundle then start SiriProxy. | ||
To start talking to Cleverbot just say "Talk to/with Cleverbot". Response is a little slow...it does have to post everything you say to the internet and then wait for Cleverbot to respond and then retrieve Cleverbot's response...so be patient. | ||
To stop talking to Cleverbot all you do is say "Goodbye" for your next response. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Example configuration options that can be placed in your main SiriProxy config.yml | ||
|
||
############################################ | ||
# NOTICE: Modifying these options in this | ||
# file has no effect. You must put | ||
# them in SiriProxy's ~/.siriproxy/config.yml | ||
############################################ | ||
|
||
- name: 'Cleverbot' | ||
git: 'git://github.com/Ponyboy47/siriproxy-cleverbot.git' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'cora' | ||
require 'siri_objects' | ||
require 'cleverbot' | ||
|
||
####### | ||
# Remember to add other plugins to the "config.yml" file if you create them! | ||
###### | ||
|
||
class SiriProxy::Plugin::Cleverbot < SiriProxy::Plugin | ||
def initialize(config) | ||
end | ||
listen_for /Talk (to|with) Clever bot/i do | ||
hResponse = ask "What would you like to say to Cleverbot?" | ||
until hResponse =~ /Goodbye/i do | ||
@cleverbot = ::Cleverbot::Client.write hResponse | ||
hResponse = ask "#{@cleverbot['message']}" | ||
end | ||
say "Goodbye then.." | ||
request_completed | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "siriproxy-cleverbot" | ||
s.version = "0.0.1" | ||
s.authors = ["Ponyboy47"] | ||
s.email = ["ponyboy47@gmail.com"] | ||
s.homepage = "" | ||
s.summary = %q{Cleverbot Client} | ||
s.description = %q{Talk to Cleverbot through Siri rather than having to type out everything} | ||
|
||
s.rubyforge_project = "siriproxy-cleverbot" | ||
|
||
s.files = `git ls-files 2> /dev/null`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/* 2> /dev/null`.split("\n") | ||
s.executables = `git ls-files -- bin/* 2> /dev/null`.split("\n").map{ |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
|
||
# specify any dependencies here; for example: | ||
# s.add_development_dependency "rspec" | ||
# s.add_runtime_dependency "rest-client" | ||
s.add_runtime_dependency "cleverbot" | ||
end |