Skip to content

Instantly share code, notes, and snippets.

View monoxgas's full-sized avatar

Nick Landers monoxgas

View GitHub Profile
@monoxgas
monoxgas / Config.yml
Created December 10, 2011 06:42 — forked from anonymous/Config.yml
My Config File
port: 443
log_level: 1
plugins:
# NOTE: run bundle after changing plugin configurations to update required gems
- name: 'Example'
path: './plugins/siriproxy-example'
# - name: 'Thermostat'
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git'
@monoxgas
monoxgas / Config.yml
Created December 10, 2011 06:42 — forked from anonymous/Config.yml
My Config File
port: 443
log_level: 1
plugins:
# NOTE: run bundle after changing plugin configurations to update required gems
- name: 'Example'
path: './plugins/siriproxy-example'
# - name: 'Thermostat'
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git'
@monoxgas
monoxgas / Ex RB
Created December 10, 2011 06:41 — forked from anonymous/Ex RB
Example RB
require 'cora'
require 'siri_objects'
require 'pp'
#######
# This is a "hello world" style plugin. It simply intercepts the phrase "test siri proxy" and responds
# with a message about the proxy being up and running (along with a couple other core features). This
# is good base code for other plugins.
#
# Remember to add other plugins to the "config.yml" file if you create them!
port: 443
log_level: 1
plugins:
# NOTE: run bundle after changing plugin configurations to update required gems
# - name: 'Example'
# path: './plugins/siriproxy-example'
# - name: 'Thermostat'
# git: 'git://github.com/plamoni/SiriProxy-Thermostat.git'
listen_for /test button/i do
add_views = SiriAddViews.new
add_views.make_root(last_ref_id)
button = SiriButton.new
button.text << "Button1"
newUtterance = SiriAssistantUtteranceView.new("Clicked!")
startRequest = SiriStartRequest.new(newUtterance, false, true)
sendCommand = SiriSendCommands.new
sendCommand.commands << startRequest
#button.commands << SiriSendCommands.new(SiriStartRequest.new(SiriAssistantUtteranceView.new("Clicked!"), false, true))
{"class"=>"AddViews",
"properties"=>
{"temporary"=>false,
"dialogPhase"=>"Summary",
"scrollToTop"=>false,
"views"=>
[{"class"=>"AssistantUtteranceView",
"properties"=>
{"dialogIdentifier"=>"AnswerFacts#noResults",
"speakableText"=>