-
-
Save danfrost/6ef921e085c70858c7f3 to your computer and use it in GitHub Desktop.
Whispering news
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| asdfasdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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