Skip to content

Instantly share code, notes, and snippets.

class SiriPlex < SiriPlugin
context :default do
listen_for /play (*)/i do|showName|
# parse season/episode if present get results from plex db
if noEpisodeSpecified
switch_context :prompt_for_episode_number
else
# play the show
end
end
port: 4433
plugins:
- SimplePlugin # simple syntax for plugins that are in rubygems and have no config
- name: 'Twitter'
path: './plugins/testproxy' # path works just like specifing in gemfile
# custom args for plgin to use
consumer_key: "YOUR KEY"
consumer_secret: "YOUR SECRET"
oauth_token: "YOUR TOKEN"
oauth_token_secret: "YOUR TOKEN SECRET"
source :gemcutter
gem 'CFPropertyList'
gem 'eventmachine'
gem 'uuidtools'
gem 'libxml-ruby'
# load plugins
require 'yaml'
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_wolfram_snippet [
{image: 'http://cl.ly/1l040J1A392n0M1n1g35/content'}, # this just makes things looks nice, but is obviously specific to my username
{text: tweetText}
]
# this locks out other plugins until a confirmation or deny
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_rich_snippets do
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username
text tweetText
end
# this locks out other plugins until a confirmation or deny
confirm do
confirmed do
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_rich_snippet do
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username
text tweetText
end
# this locks out other plugins until a confirmation or deny
confirm do
confirmed do
netpro2k: /Users/netpro2k
-> siriproxy
Siri Proxy is a proxy server for Apple's Siri "assistant." The idea is to allow for the creation of custom handlers for different actions. This can allow developers to easily add functionality to Siri.
See: http://github.com/plamoni/SiriProxy/
Usage: siriproxy COMMAND OPTIONS
Commands:
-> bin/siriproxy console
>> test siri proxy
=> Siri Proxy is up and running!
>> tweet hello
=> Here is your tweet:
=> #<SiriAddViews:0x007fceee8a3e90>
=> Ready to send it?
>> no
=> Ok I won't send it.
>> asdlksajdasld
Cora (then overridden in siri):
option lists - (added as options: to ask)
location lists - (list of google maps links)
map snippets - (link to google map)
Siri
sms and email snippets (need to determine how these work)
To Discuss
buttons (not sure how buttons should work yet)
(function(log){
console.log = function(msg){
log.call(console, msg + "...Bitch!");
}
})(console.log)