agents.yml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. jane_website_agent:
  2. type: Agents::WebsiteAgent
  3. user: jane
  4. events_count: 1
  5. schedule: "5pm"
  6. name: "ZKCD"
  7. guid: <%= SecureRandom.hex %>
  8. options: <%= {
  9. :url => "http://trailers.apple.com/trailers/home/rss/newtrailers.rss",
  10. :expected_update_period_in_days => 2,
  11. :mode => :on_change,
  12. :extract => {
  13. :title => {:css => "item title", :value => './/text()'},
  14. :url => {:css => "item link", :value => './/text()'}
  15. }
  16. }.to_json.inspect %>
  17. bob_website_agent:
  18. type: Agents::WebsiteAgent
  19. user: bob
  20. events_count: 1
  21. schedule: "midnight"
  22. name: "ZKCD"
  23. guid: <%= SecureRandom.hex %>
  24. options: <%= {
  25. :url => "http://xkcd.com",
  26. :expected_update_period_in_days => 2,
  27. :mode => :on_change,
  28. :extract => {
  29. :url => {:css => "#comic img", :value => "@src"},
  30. :title => {:css => "#comic img", :value => "@title"}
  31. }
  32. }.to_json.inspect %>
  33. bob_disabled_website_agent:
  34. type: Agents::WebsiteAgent
  35. disabled: true
  36. user: bob
  37. events_count: 1
  38. schedule: "midnight"
  39. name: "Disabled Agent"
  40. guid: <%= SecureRandom.hex %>
  41. options: <%= {
  42. :url => "http://xkcd.com",
  43. :expected_update_period_in_days => 2,
  44. :mode => :on_change,
  45. :extract => {
  46. :url => {:css => "#comic img", :value => "@src"},
  47. :title => {:css => "#comic img", :value => "@title"}
  48. }
  49. }.to_json.inspect %>
  50. bob_weather_agent:
  51. type: Agents::WeatherAgent
  52. user: bob
  53. schedule: "midnight"
  54. name: "SF Weather"
  55. guid: <%= SecureRandom.hex %>
  56. keep_events_for: <%= 45.days %>
  57. options: <%= { :location => 94102, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  58. bob_formatting_agent:
  59. type: Agents::EventFormattingAgent
  60. user: bob
  61. name: "Formatting Agent"
  62. guid: <%= SecureRandom.hex %>
  63. keep_events_for: <%= 45.days %>
  64. options: <%= { instructions: {}, mode: 'clean' }.to_json.inspect %>
  65. jane_weather_agent:
  66. type: Agents::WeatherAgent
  67. user: jane
  68. schedule: "midnight"
  69. name: "SF Weather"
  70. guid: <%= SecureRandom.hex %>
  71. keep_events_for: <%= 30.days %>
  72. options: <%= { :location => 94103, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  73. jane_rain_notifier_agent:
  74. type: Agents::TriggerAgent
  75. user: jane
  76. name: "Jane's Rain Watcher"
  77. guid: <%= SecureRandom.hex %>
  78. options: <%= {
  79. :expected_receive_period_in_days => "2",
  80. :rules => [{
  81. :type => "regex",
  82. :value => "rain",
  83. :path => "conditions"
  84. }],
  85. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  86. }.to_json.inspect %>
  87. bob_rain_notifier_agent:
  88. type: Agents::TriggerAgent
  89. user: bob
  90. name: "Bob's Rain Watcher"
  91. guid: <%= SecureRandom.hex %>
  92. options: <%= {
  93. :expected_receive_period_in_days => "2",
  94. :rules => [{
  95. :type => "regex",
  96. :value => "rain",
  97. :path => "conditions"
  98. }],
  99. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  100. }.to_json.inspect %>
  101. bob_twitter_user_agent:
  102. type: Agents::TwitterUserAgent
  103. user: bob
  104. name: "Bob's Twitter User Watcher"
  105. guid: <%= SecureRandom.hex %>
  106. options: <%= {
  107. :username => "tectonic",
  108. :expected_update_period_in_days => "2",
  109. :consumer_key => "---",
  110. :consumer_secret => "---",
  111. :oauth_token => "---",
  112. :oauth_token_secret => "---"
  113. }.to_json.inspect %>
  114. tectonic_twitter_user_agent:
  115. type: Agents::TwitterFavorites
  116. user: tectonic
  117. name: "tectonic's Twitter Favorites Watcher"
  118. guid: <%= SecureRandom.hex %>
  119. options: <%= {
  120. :username => "tectonic",
  121. :expected_update_period_in_days => "2",
  122. :consumer_key => "---",
  123. :consumer_secret => "---",
  124. :oauth_token => "---",
  125. :oauth_token_secret => "---"
  126. }.to_json.inspect %>
  127. bob_manual_event_agent:
  128. type: Agents::ManualEventAgent
  129. user: bob
  130. name: "Bob's event testing agent"
  131. guid: <%= SecureRandom.hex %>
  132. bob_basecamp_agent:
  133. type: Agents::BasecampAgent
  134. user: bob
  135. service: generic
  136. guid: <%= SecureRandom.hex %>
  137. bob_csv_agent:
  138. type: Agents::CsvAgent
  139. user: bob
  140. name: "Bob's CsvAgent"
  141. guid: <%= SecureRandom.hex %>
  142. jane_basecamp_agent:
  143. type: Agents::BasecampAgent
  144. user: jane
  145. service: generic
  146. guid: <%= SecureRandom.hex %>
  147. bob_data_output_agent:
  148. type: Agents::DataOutputAgent
  149. user: bob
  150. name: RSS Feed
  151. guid: <%= SecureRandom.hex %>
  152. options: <%= {
  153. expected_receive_period_in_days: 3,
  154. secrets: ['secret'],
  155. template: {
  156. title: 'unchanged',
  157. description: 'unchanged',
  158. item: {
  159. title: 'unchanged',
  160. description: 'unchanged',
  161. author: 'unchanged',
  162. link: 'http://example.com'
  163. }
  164. }
  165. }.to_json.inspect %>