Skip to content

Instantly share code, notes, and snippets.

@nakao
Created August 12, 2010 15:27
Show Gist options
  • Save nakao/521153 to your computer and use it in GitHub Desktop.
Save nakao/521153 to your computer and use it in GitHub Desktop.
# ruby tkana.rb http://twitter.com/synobu/status/20976018979
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'htmlentities'
url = ARGV[0]
doc = Nokogiri::XML.parse(open(url).read)
t = (doc/"span.entry-content").to_s.gsub(/<.+?>/,'')
t = HTMLEntities.new.decode(t)
system "SayKana -s 70 '#{t}' "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment