-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced example
lukes edited this page May 5, 2011
·
7 revisions
This is a monster, but it's possible
herald = Herald.watch do
check :twitter do
_for "#hashtag"
action :post, :uri => "localhost/save.php"
action :stdout, :file => "file.log"
end
check :rss, :from => ["example.com/1.rss", "example.com/2.rss"] do
every 1 => "hour"
action :growl
action do |item|
if item.data.respond_to?(:author) && item.data.author == "Tama"
File.open("tama.log", 'w') {|f| f.write(item.data) }
end
end
end
check :website, :uri => "example.com/1.html"
check :website, :uri => "example.com/2.html"
check :website, :uri => "example.com/3.html"
_for ["keyword", "text"]
every 1 => "day"
action :stdout, :file => "file.log"
end