Skip to content

Instantly share code, notes, and snippets.

@danfrost
Created January 29, 2015 15:10
Show Gist options
  • Save danfrost/6ef921e085c70858c7f3 to your computer and use it in GitHub Desktop.
Save danfrost/6ef921e085c70858c7f3 to your computer and use it in GitHub Desktop.
Whispering news
asdfasdf
require 'rss'
require 'open-uri'
strings = []
url = 'http://feeds.bbci.co.uk/news/world/rss.xml'
open(url) do |rss|
feed = RSS::Parser.parse(rss)
puts "Title: #{feed.channel.title}"
feed.items.each do |item|
strings.push "#{item.title}"
end
end
string = strings.join ' '
`say -r 20 -i -v Whisper \"#{string}\"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment