Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
require 'rubygems'
gem 'httparty', '= 0.4.3'
require 'httparty'
require 'tinder'
require 'feedzirra'
require 'nokogiri'
current_woot = nil
woot_url = ''
subdomain = 'your_subdomain'
token = 'your_token_goes_here'
room_name = 'your_room'
post_images = false
post_to_campfire = true
campfire = subdomain, :token => token
room = campfire.find_room_by_name room_name
while true
feed = Feedzirra::Feed.fetch_and_parse(woot_url)
woot = feed.entries.shift
while woot.categories.first != 'Woot'
woot = feed.entries.shift
if woot && current_woot != woot.url
html_doc = Nokogiri::HTML(woot.summary)
image = html_doc.at_css("img.thumbnail")
image_url = image['src'] if image
new_woot = "WootBot: #{woot.title} - #{woot.url}"
if post_to_campfire
room.speak new_woot
room.speak image_url if image_url && post_images
puts new_woot
puts image_url
current_woot = woot.url
sleep 30

This comment has been minimized.

Copy link
Owner Author

@stve stve commented Sep 21, 2010

consider it done! also filtered out regular blog posts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment