Skip to content

Instantly share code, notes, and snippets.

@thelinuxlich
Created March 17, 2010 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thelinuxlich/335481 to your computer and use it in GitHub Desktop.
Save thelinuxlich/335481 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'rbuzz'
feed_url = Rbuzz::Feed.discover("114203222565764280000")
feed_antigo = ""
loop do
feed = Rbuzz::Feed.retrieve(feed_url)
ultimo_feed = feed.entries[0]
conteudo = ultimo_feed.content.gsub(/<\/?[^>]*>/, "")[0..200]+"..."
if conteudo != feed_antigo
titulo = "#{ultimo_feed.author.name}"
feed_antigo = ultimo_feed
`notify-send -u low -i gtk-dialog-info "#{titulo}" "#{conteudo}" -t 5000`
feed_antigo = conteudo
end
sleep(120)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment