Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shokai committed Jan 12, 2014
0 parents commit d8239a8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*~
*#*
.DS_Store
node_modules
*.log
15 changes: 15 additions & 0 deletions node-linda-mac-say.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
process.env.LINDA_SPACE ||= "test"
process.env.LINDA_BASE ||= "http://node-linda-base.herokuapp.com"

{exec} = require 'child_process'
LindaClient = require('linda-socket.io').Client
socket = require('socket.io-client').connect(process.env.LINDA_BASE)
linda = new LindaClient().connect(socket)

ts = linda.tuplespace(process.env.LINDA_SPACE)

linda.io.on 'connect', ->
console.log "connect!! #{process.env.LINDA_BASE}"
ts.watch {'type': 'say'}, (err, tuple) ->
console.log tuple
exec "say #{tuple.data.value}"
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "node-linda-mac-say",
"version": "0.0.0",
"description": "call Mac OSX Say command with linda-socket.io",
"main": "node-linda-mac-say.coffee",
"scripts": {
"start": "node_modules/coffee-script/bin/coffee node-linda-mac-say.coffee"
},
"author": "Sho Hashimoto <[email protected]>",
"license": "MIT",
"dependencies": {
"coffee-script": "~1.6.3",
"linda-socket.io": "~0.1.5",
"socket.io-client": "~0.9.16"
}
}

0 comments on commit d8239a8

Please sign in to comment.