diff --git a/db/seeds.rb b/db/seeds.rb index 27cb3b84..8350e510 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -9,11 +9,16 @@ user.invitation_code = User::INVITATION_CODES.first user.admin = true user.save! +puts +puts + unless user.agents.where(:name => "SF Weather Agent").exists? Agent.build_for_type("Agents::WeatherAgent", user, :name => "SF Weather Agent", :schedule => "10pm", - :options => { 'location' => "94103", 'api_key' => "your-key" }).save! + :options => { 'location' => "94103", 'api_key' => "put-your-key-here" }).save! + + puts "NOTE: The example 'SF Weather Agent' will not work until you edit it and put in a free API key from http://www.wunderground.com/weather/api/" end unless user.agents.where(:name => "XKCD Source").exists? @@ -25,7 +30,7 @@ unless user.agents.where(:name => "XKCD Source").exists? 'url' => "http://xkcd.com", 'mode' => "on_change", 'expected_update_period_in_days' => 5, - 'extrac' => { + 'extract' => { 'url' => { 'css' => "#comic img", 'attr' => "src" }, 'title' => { 'css' => "#comic img", 'attr' => "title" } } @@ -77,3 +82,5 @@ unless user.agents.where(:name => "Afternoon Digest").exists? :options => { 'subject' => "Your Afternoon Digest", 'expected_receive_period_in_days' => "7" }, :source_ids => user.agents.where(:name => ["iTunes Trailer Source", "XKCD Source"]).pluck(:id)).save! end + +puts "See the Huginn Wiki for more Agent examples! https://github.com/cantino/huginn/wiki"