agents.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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 => 'string(.)'},
  14. :url => {:css => "item link", :value => 'string(.)'}
  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 => "37.779329,-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 => "37.779329,-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_twitter_user_agent:
  133. type: Agents::TwitterUserAgent
  134. user: bob
  135. name: "bob tweets agent"
  136. service: generic
  137. guid: <%= SecureRandom.hex %>
  138. options: <%= {
  139. username: 'bob',
  140. expected_update_period_in_days: 2,
  141. }.to_json.inspect %>
  142. bob_csv_agent:
  143. type: Agents::CsvAgent
  144. user: bob
  145. name: "Bob's CsvAgent"
  146. guid: <%= SecureRandom.hex %>
  147. jane_twitter_user_agent:
  148. type: Agents::TwitterUserAgent
  149. user: jane
  150. name: "jane tweets agent"
  151. service: generic
  152. guid: <%= SecureRandom.hex %>
  153. options: <%= {
  154. username: 'jane',
  155. expected_update_period_in_days: 2,
  156. }.to_json.inspect %>
  157. bob_data_output_agent:
  158. type: Agents::DataOutputAgent
  159. user: bob
  160. name: RSS Feed
  161. guid: <%= SecureRandom.hex %>
  162. options: <%= {
  163. expected_receive_period_in_days: 3,
  164. secrets: ['secret'],
  165. template: {
  166. title: 'unchanged',
  167. description: 'unchanged',
  168. item: {
  169. title: 'unchanged',
  170. description: 'unchanged',
  171. author: 'unchanged',
  172. link: 'http://example.com'
  173. }
  174. }
  175. }.to_json.inspect %>