plamoni / SiriProxy

A (tampering) proxy server for Apple's Siri
GNU General Public License v3.0
2.12k stars 343 forks source link

How to simply read data from a file ?? #459

Closed CarstenKochems closed 11 years ago

CarstenKochems commented 11 years ago

Hello, i got skripts at my Raspberry Pi that fill some logs with Data, Temp and Light status.

Now my question, hab to read the first line from /root/Temp/data.txt

and say it like: say " It is 22 degres inside"

Thank you this is soo awesome

plamoni commented 11 years ago

http://www.abbeyworkshop.com/howto/ruby/rb-readfile/index.html

tommyd75 commented 11 years ago

Steakschen, Did you ever figure this out? I also have some text files I want to be read out loud by Siri. I looked at that page above but still keep crashing SiriProxy when I use the examples. Might be a little above my head :)

tommyd75 commented 11 years ago

Steakschen, I just spoke to soon,

Here's what's working for me. I'm using this with Homeseer to read text files that get updated with the status of different devices. I think your use is a little different because the program I'm using (Homeseer) updates the text files but it runs a web server which allows me to link to the text files.

Here's what works for me.

listen_for /what's the status of the alarm system/i do begin page = HTTParty.get('http://10.10.10.10/alarmstatus.txt').body rescue nil say page request_completed end end