I showed it at the last Seattle.rb meeting, and got some positive
feedback (as well as testing/development help from zenspider and
evan[w]), so I thought I'd better get a copy out for more people to
start playing with.
It's fairly simple to use:
A script like:
require 'r43'
connection = R43.new(1234)
person = connection.get_person('gormhe')
person.goals.each do |goal|
puts "I want to #{goal.name}"
end
yields:
I want to Learn XUL
I want to Make Opera my default browser
(Unless gormhe has added more things.)
You can download a tarball from http://rubyforge.org/projects/r43
--
thanks,
-pate
-------------------------
We are often unable to tell people what they need to know, because
they want to know something else, and would therefore only
misunderstand what we said
- the Raven (George MacDonald, Lilith)
require "/path/to/OSXtts.rb"
tts = OSXtts.new("Victoria")
r43.new("Your43ThingsNick").goals.each { | aToDo | tts.say(aToDo) }
and have the sexy Victoria come on in the AM to do her thing, reminding
us of what we really need to be doing while alone coding during the
long morning hours of lonesomeness :)
-----------------------------------------------------------------------
require 'dl/import'
$fw = '/System/Library/Frameworks/ApplicationServices.framework'
$fw += '/Frameworks/SpeechSynthesis.framework/SpeechSynthesis'
module TTS
extend DL::Importable
dlload $fw
typealias 'OSErr', 'short'
extern 'short SpeechBusy()'
extern 'OSErr SpeakString(void*)'
def TTS.say( something )
pstring = [ something.length, something ].pack( "Ca*" )
TTS.speakString( pstring )
sleep( 0.1 ) while TTS.speechBusy > 0
end
end
TTS.say( "I sure like being inside this fancy computer" )
-----------------------------------------------------------------------
That should be enough to get you started ;)
--
Luc Heinrich - luc...@mac.com