@@ -16,6 +16,17 @@ class @AgentEditPage |
||
16 | 16 |
if $("#agent_type").length |
17 | 17 |
$("#agent_type").on "change", => @handleTypeChange(false) |
18 | 18 |
@handleTypeChange(true) |
19 |
+ |
|
20 |
+ # Update the dropdown to match agent description as well as agent name |
|
21 |
+ $('#agent_type').select2 |
|
22 |
+ width: 'resolve' |
|
23 |
+ formatResult: formatAgentForSelect |
|
24 |
+ escapeMarkup: (m) -> |
|
25 |
+ m |
|
26 |
+ matcher: (term, text, opt) -> |
|
27 |
+ description = opt.attr('title') |
|
28 |
+ text.toUpperCase().indexOf(term.toUpperCase()) >= 0 or description.toUpperCase().indexOf(term.toUpperCase()) >= 0 |
|
29 |
+ |
|
19 | 30 |
else |
20 | 31 |
@enableDryRunButton() |
21 | 32 |
@buildAce() |
@@ -177,5 +188,10 @@ class @AgentEditPage |
||
177 | 188 |
@updateFromEditors() |
178 | 189 |
Utils.handleDryRunButton(e.target) |
179 | 190 |
|
191 |
+ formatAgentForSelect = (agent) -> |
|
192 |
+ originalOption = agent.element |
|
193 |
+ description = agent.element[0].title |
|
194 |
+ '<strong>' + agent.text + '</strong><br/>' + description |
|
195 |
+ |
|
180 | 196 |
$ -> |
181 | 197 |
Utils.registerPage(AgentEditPage, forPathsMatching: /^agents/) |
@@ -304,3 +304,8 @@ $service-colors: #55acee #8fc857 #444444 #2c4762 #007EE5 |
||
304 | 304 |
.label-service { |
305 | 305 |
@include services; |
306 | 306 |
} |
307 |
+ |
|
308 |
+.select2-highlighted a { |
|
309 |
+ color: yellow; |
|
310 |
+ text-decoration: underline; |
|
311 |
+} |
@@ -6,6 +6,7 @@ module Agents |
||
6 | 6 |
|
7 | 7 |
description <<-MD |
8 | 8 |
The Adioso Agent will tell you the minimum airline prices between a pair of cities, and within a certain period of time. |
9 |
+ |
|
9 | 10 |
The currency is USD. Please make sure that the difference between `start_date` and `end_date` is less than 150 days. You will need to contact [Adioso](http://adioso.com/) |
10 | 11 |
for a `username` and `password`. |
11 | 12 |
MD |
@@ -7,10 +7,9 @@ module Agents |
||
7 | 7 |
cannot_receive_events! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
- The BasecampAgent checks a Basecamp project for new Events |
|
10 |
+ The Basecamp Agent checks a Basecamp project for new Events |
|
11 | 11 |
|
12 | 12 |
To be able to use this Agent you need to authenticate with 37signals in the [Services](/services) section first. |
13 |
- |
|
14 | 13 |
MD |
15 | 14 |
|
16 | 15 |
event_description <<-MD |
@@ -3,7 +3,7 @@ module Agents |
||
3 | 3 |
cannot_be_scheduled! |
4 | 4 |
|
5 | 5 |
description <<-MD |
6 |
- The ChangeDetectorAgent receives a stream of events and emits a new event when a property of the received event changes. |
|
6 |
+ The Change Detector Agent receives a stream of events and emits a new event when a property of the received event changes. |
|
7 | 7 |
|
8 | 8 |
`property` specifies the property to be watched. |
9 | 9 |
|
@@ -5,7 +5,7 @@ module Agents |
||
5 | 5 |
cannot_create_events! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
- This agent is triggered by schedule or an incoming event and commands other agents ("targets") to run, disable, configure, or enable themselves. |
|
8 |
+ The Commander Agent is triggered by schedule or an incoming event, and commands other agents ("targets") to run, disable, configure, or enable themselves. |
|
9 | 9 |
|
10 | 10 |
# Action types |
11 | 11 |
|
@@ -4,7 +4,7 @@ module Agents |
||
4 | 4 |
|
5 | 5 |
description do |
6 | 6 |
<<-MD |
7 |
- The Agent outputs received events as either RSS or JSON. Use it to output a public or private stream of Huginn data. |
|
7 |
+ The Data Output Agent outputs received events as either RSS or JSON. Use it to output a public or private stream of Huginn data. |
|
8 | 8 |
|
9 | 9 |
This Agent will output data at: |
10 | 10 |
|
@@ -4,7 +4,7 @@ module Agents |
||
4 | 4 |
cannot_be_scheduled! |
5 | 5 |
|
6 | 6 |
description <<-MD |
7 |
- The DeDuplicationAgent receives a stream of events and remits the event if it is not a duplicate. |
|
7 |
+ The De-duplication Agent receives a stream of events and remits the event if it is not a duplicate. |
|
8 | 8 |
|
9 | 9 |
`property` the value that should be used to determine the uniqueness of the event (empty to use the whole payload) |
10 | 10 |
|
@@ -5,9 +5,9 @@ module Agents |
||
5 | 5 |
cannot_be_scheduled! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
+ The Dropbox File Url Agent is used to work with Dropbox. It takes a file path (or multiple file paths) and emits events with [temporary links](https://www.dropbox.com/developers/core/docs#media). |
|
9 |
+ |
|
8 | 10 |
#{'## Include the `dropbox-api` and `omniauth-dropbox` gems in your `Gemfile` and set `DROPBOX_OAUTH_KEY` and `DROPBOX_OAUTH_SECRET` in your environment to use Dropbox Agents.' if dependencies_missing?} |
9 |
- The _DropboxFileUrlAgent_ is used to work with Dropbox. It takes a file path (or multiple files paths) and emits |
|
10 |
- events with [temporary links](https://www.dropbox.com/developers/core/docs#media). |
|
11 | 11 |
|
12 | 12 |
The incoming event payload needs to have a `paths` key, with a comma-separated list of files you want the URL for. For example: |
13 | 13 |
|
@@ -6,8 +6,9 @@ module Agents |
||
6 | 6 |
default_schedule "every_1m" |
7 | 7 |
|
8 | 8 |
description <<-MD |
9 |
+ The Dropbox Watch Agent watches the given `dir_to_watch` and emits events with the detected changes. |
|
10 |
+ |
|
9 | 11 |
#{'## Include the `dropbox-api` and `omniauth-dropbox` gems in your `Gemfile` and set `DROPBOX_OAUTH_KEY` and `DROPBOX_OAUTH_SECRET` in your environment to use Dropbox Agents.' if dependencies_missing?} |
10 |
- The _DropboxWatchAgent_ watches the given `dir_to_watch` and emits events with the detected changes. |
|
11 | 12 |
MD |
12 | 13 |
|
13 | 14 |
event_description <<-MD |
@@ -6,7 +6,7 @@ module Agents |
||
6 | 6 |
cannot_create_events! |
7 | 7 |
|
8 | 8 |
description <<-MD |
9 |
- The EmailAgent sends any events it receives via email immediately. |
|
9 |
+ The Email Agent sends any events it receives via email immediately. |
|
10 | 10 |
|
11 | 11 |
You can specify the email's subject line by providing a `subject` option, which can contain Liquid formatting. E.g., |
12 | 12 |
you could provide `"Huginn email"` to set a simple subject, or `{{subject}}` to use the `subject` key from the incoming Event. |
@@ -7,7 +7,7 @@ module Agents |
||
7 | 7 |
cannot_create_events! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
- The EmailDigestAgent collects any Events sent to it and sends them all via email when scheduled. |
|
10 |
+ The Email Digest Agent collects any Events sent to it and sends them all via email when scheduled. |
|
11 | 11 |
|
12 | 12 |
By default, the will have a `subject` and an optional `headline` before listing the Events. If the Events' |
13 | 13 |
payloads contain a `message`, that will be highlighted, otherwise everything in |
@@ -3,7 +3,7 @@ module Agents |
||
3 | 3 |
cannot_be_scheduled! |
4 | 4 |
|
5 | 5 |
description <<-MD |
6 |
- An Event Formatting Agent allows you to format incoming Events, adding new fields as needed. |
|
6 |
+ The Event Formatting Agent allows you to format incoming Events, adding new fields as needed. |
|
7 | 7 |
|
8 | 8 |
For example, here is a possible Event: |
9 | 9 |
|
@@ -9,8 +9,10 @@ module Agents |
||
9 | 9 |
gem_dependency_check { defined?(Net::FTP) && defined?(Net::FTP::List) } |
10 | 10 |
|
11 | 11 |
description <<-MD |
12 |
+ The FTP Site Agent checks an FTP site and creates Events based on newly uploaded files in a directory. |
|
13 |
+ |
|
12 | 14 |
#{'## Include `net-ftp-list` in your Gemfile to use this Agent!' if dependencies_missing?} |
13 |
- The FtpsiteAgent checks a FTP site and creates Events based on newly uploaded files in a directory. |
|
15 |
+ |
|
14 | 16 |
|
15 | 17 |
Specify a `url` that represents a directory of an FTP site to watch, and a list of `patterns` to match against file names. |
16 | 18 |
|
@@ -7,8 +7,9 @@ module Agents |
||
7 | 7 |
gem_dependency_check { defined?(Google) && defined?(Google::APIClient) } |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
+ The Google Calendar Publish Agent creates events on your Google Calendar. |
|
11 |
+ |
|
10 | 12 |
#{'## Include `google-api-client` in your Gemfile to use this Agent!' if dependencies_missing?} |
11 |
- The GoogleCalendarPublishAgent creates events on your google calendar. |
|
12 | 13 |
|
13 | 14 |
This agent relies on service accounts, rather than oauth. |
14 | 15 |
|
@@ -8,8 +8,9 @@ module Agents |
||
8 | 8 |
gem_dependency_check { defined?(Growl) } |
9 | 9 |
|
10 | 10 |
description <<-MD |
11 |
+ The Growl Agent sends any events it receives to a Growl GNTP server immediately. |
|
12 |
+ |
|
11 | 13 |
#{'## Include `ruby-growl` in your Gemfile to use this Agent!' if dependencies_missing?} |
12 |
- The GrowlAgent sends any events it receives to a Growl GNTP server immediately. |
|
13 | 14 |
|
14 | 15 |
It is assumed that events have a `message` or `text` key, which will hold the body of the growl notification, and a `subject` key, which will have the headline of the Growl notification. You can use Event Formatting Agent if your event does not provide these keys. |
15 | 16 |
|
@@ -8,8 +8,9 @@ module Agents |
||
8 | 8 |
gem_dependency_check { defined?(HipChat) } |
9 | 9 |
|
10 | 10 |
description <<-MD |
11 |
+ The Hipchat Agent sends messages to a Hipchat Room |
|
12 |
+ |
|
11 | 13 |
#{'## Include `hipchat` in your Gemfile to use this Agent!' if dependencies_missing?} |
12 |
- The HipchatAgent sends messages to a Hipchat Room |
|
13 | 14 |
|
14 | 15 |
To authenticate you need to set the `auth_token`, you can get one at your Hipchat Group Admin page which you can find here: |
15 | 16 |
|
@@ -5,8 +5,9 @@ module Agents |
||
5 | 5 |
gem_dependency_check { defined?(RTurk) } |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
+ The Human Task Agent is used to create Human Intelligence Tasks (HITs) on Mechanical Turk. |
|
9 |
+ |
|
8 | 10 |
#{'## Include `rturk` in your Gemfile to use this Agent!' if dependencies_missing?} |
9 |
- You can use a HumanTaskAgent to create Human Intelligence Tasks (HITs) on Mechanical Turk. |
|
10 | 11 |
|
11 | 12 |
HITs can be created in response to events, or on a schedule. Set `trigger_on` to either `schedule` or `event`. |
12 | 13 |
|
@@ -11,90 +11,52 @@ module Agents |
||
11 | 11 |
default_schedule "every_30m" |
12 | 12 |
|
13 | 13 |
description <<-MD |
14 |
+ The Imap Folder Agent checks an IMAP server in specified folders and creates Events based on new mails found since the last run. In the first visit to a folder, this agent only checks for the initial status and does not create events. |
|
14 | 15 |
|
15 |
- The ImapFolderAgent checks an IMAP server in specified folders |
|
16 |
- and creates Events based on new mails found since the last run. |
|
17 |
- In the first visit to a folder, this agent only checks for the |
|
18 |
- initial status and does not create events. |
|
19 |
- |
|
20 |
- Specify an IMAP server to connect with `host`, and set `ssl` to |
|
21 |
- true if the server supports IMAP over SSL. Specify `port` if |
|
22 |
- you need to connect to a port other than standard (143 or 993 |
|
23 |
- depending on the `ssl` value). |
|
16 |
+ Specify an IMAP server to connect with `host`, and set `ssl` to true if the server supports IMAP over SSL. Specify `port` if you need to connect to a port other than standard (143 or 993 depending on the `ssl` value). |
|
24 | 17 |
|
25 | 18 |
Specify login credentials in `username` and `password`. |
26 | 19 |
|
27 | 20 |
List the names of folders to check in `folders`. |
28 | 21 |
|
29 |
- To narrow mails by conditions, build a `conditions` hash with |
|
30 |
- the following keys: |
|
31 |
- |
|
32 |
- - "subject" |
|
33 |
- - "body" |
|
34 |
- |
|
35 |
- Specify a regular expression to match against the decoded |
|
36 |
- subject/body of each mail. |
|
22 |
+ To narrow mails by conditions, build a `conditions` hash with the following keys: |
|
37 | 23 |
|
38 |
- Use the `(?i)` directive for case-insensitive search. For |
|
39 |
- example, a pattern `(?i)alert` will match "alert", "Alert" |
|
40 |
- or "ALERT". You can also make only a part of a pattern to |
|
41 |
- work case-insensitively: `Re: (?i:alert)` will match either |
|
42 |
- "Re: Alert" or "Re: alert", but not "RE: alert". |
|
24 |
+ - `subject` |
|
25 |
+ - `body` |
|
26 |
+ Specify a regular expression to match against the decoded subject/body of each mail. |
|
43 | 27 |
|
44 |
- When a mail has multiple non-attachment text parts, they are |
|
45 |
- prioritized according to the `mime_types` option (which see |
|
46 |
- below) and the first part that matches a "body" pattern, if |
|
47 |
- specified, will be chosen as the "body" value in a created |
|
48 |
- event. |
|
28 |
+ Use the `(?i)` directive for case-insensitive search. For example, a pattern `(?i)alert` will match "alert", "Alert"or "ALERT". You can also make only a part of a pattern to work case-insensitively: `Re: (?i:alert)` will match either "Re: Alert" or "Re: alert", but not "RE: alert". |
|
49 | 29 |
|
50 |
- Named captures will appear in the "matches" hash in a |
|
51 |
- created event. |
|
30 |
+ When a mail has multiple non-attachment text parts, they are prioritized according to the `mime_types` option (which see below) and the first part that matches a "body" pattern, if specified, will be chosen as the "body" value in a created event. |
|
52 | 31 |
|
53 |
- - "from", "to", "cc" |
|
32 |
+ Named captures will appear in the "matches" hash in a created event. |
|
54 | 33 |
|
55 |
- Specify a shell glob pattern string that is matched against |
|
56 |
- mail addresses extracted from the corresponding header |
|
57 |
- values of each mail. |
|
34 |
+ - `from`, `to`, `cc` |
|
35 |
+ Specify a shell glob pattern string that is matched against mail addresses extracted from the corresponding header values of each mail. |
|
58 | 36 |
|
59 | 37 |
Patterns match addresses in case insensitive manner. |
60 | 38 |
|
61 |
- Multiple pattern strings can be specified in an array, in |
|
62 |
- which case a mail is selected if any of the patterns |
|
63 |
- matches. (i.e. patterns are OR'd) |
|
39 |
+ Multiple pattern strings can be specified in an array, in which case a mail is selected if any of the patterns matches. (i.e. patterns are OR'd) |
|
64 | 40 |
|
65 |
- - "mime_types" |
|
41 |
+ - `mime_types` |
|
42 |
+ Specify an array of MIME types to tell which non-attachment part of a mail among its text/* parts should be used as mail body. The default value is `['text/plain', 'text/enriched', 'text/html']`. |
|
66 | 43 |
|
67 |
- Specify an array of MIME types to tell which non-attachment |
|
68 |
- part of a mail among its text/* parts should be used as mail |
|
69 |
- body. The default value is `['text/plain', 'text/enriched', |
|
70 |
- 'text/html']`. |
|
71 |
- |
|
72 |
- - "is_unread" |
|
73 |
- |
|
74 |
- Setting this to true or false means only mails that is |
|
75 |
- marked as unread or read respectively, are selected. |
|
44 |
+ - `is_unread` |
|
45 |
+ Setting this to true or false means only mails that is marked as unread or read respectively, are selected. |
|
76 | 46 |
|
77 | 47 |
If this key is unspecified or set to null, it is ignored. |
78 | 48 |
|
79 |
- - "has_attachment" |
|
80 |
- |
|
81 |
- Setting this to true or false means only mails that does or does |
|
82 |
- not have an attachment are selected. |
|
49 |
+ - `has_attachment` |
|
50 |
+ |
|
51 |
+ Setting this to true or false means only mails that does or does not have an attachment are selected. |
|
83 | 52 |
|
84 | 53 |
If this key is unspecified or set to null, it is ignored. |
85 | 54 |
|
86 | 55 |
Set `mark_as_read` to true to mark found mails as read. |
87 | 56 |
|
88 |
- Each agent instance memorizes the highest UID of mails that are |
|
89 |
- found in the last run for each watched folder, so even if you |
|
90 |
- change a set of conditions so that it matches mails that are |
|
91 |
- missed previously, or if you alter the flag status of already |
|
92 |
- found mails, they will not show up as new events. |
|
57 |
+ Each agent instance memorizes the highest UID of mails that are found in the last run for each watched folder, so even if you change a set of conditions so that it matches mails that are missed previously, or if you alter the flag status of already found mails, they will not show up as new events. |
|
93 | 58 |
|
94 |
- Also, in order to avoid duplicated notification it keeps a list |
|
95 |
- of Message-Id's of 100 most recent mails, so if multiple mails |
|
96 |
- of the same Message-Id are found, you will only see one event |
|
97 |
- out of them. |
|
59 |
+ Also, in order to avoid duplicated notification it keeps a list of Message-Id's of 100 most recent mails, so if multiple mails of the same Message-Id are found, you will only see one event out of them. |
|
98 | 60 |
MD |
99 | 61 |
|
100 | 62 |
event_description <<-MD |
@@ -6,8 +6,9 @@ module Agents |
||
6 | 6 |
gem_dependency_check { defined?(Jabber) } |
7 | 7 |
|
8 | 8 |
description <<-MD |
9 |
+ The Jabber Agent will send any events it receives to your Jabber/XMPP IM account. |
|
10 |
+ |
|
9 | 11 |
#{'## Include `xmpp4r` in your Gemfile to use this Agent!' if dependencies_missing?} |
10 |
- The JabberAgent will send any events it receives to your Jabber/XMPP IM account. |
|
11 | 12 |
|
12 | 13 |
Specify the `jabber_server` and `jabber_port` for your Jabber server. |
13 | 14 |
|
@@ -10,7 +10,7 @@ module Agents |
||
10 | 10 |
default_schedule "never" |
11 | 11 |
|
12 | 12 |
description <<-MD |
13 |
- This Agent allows you to write code in JavaScript that can create and receive events. If other Agents aren't meeting your needs, try this one! |
|
13 |
+ The JavaScript Agent allows you to write code in JavaScript that can create and receive events. If other Agents aren't meeting your needs, try this one! |
|
14 | 14 |
|
15 | 15 |
You can put code in the `code` option, or put your code in a Credential and reference it from `code` with `credential:<name>` (recommended). |
16 | 16 |
|
@@ -11,12 +11,13 @@ module Agents |
||
11 | 11 |
description <<-MD |
12 | 12 |
The Jira Agent subscribes to Jira issue updates. |
13 | 13 |
|
14 |
- `jira_url` specifies the full URL of the jira installation, including https:// |
|
15 |
- `jql` is an optional Jira Query Language-based filter to limit the flow of events. See [JQL Docs](https://confluence.atlassian.com/display/JIRA/Advanced+Searching) for details. |
|
16 |
- `username` and `password` are optional, and may need to be specified if your Jira instance is read-protected |
|
17 |
- `timeout` is an optional parameter that specifies how long the request processing may take in minutes. |
|
14 |
+ - `jira_url` specifies the full URL of the jira installation, including https:// |
|
15 |
+ - `jql` is an optional Jira Query Language-based filter to limit the flow of events. See [JQL Docs](https://confluence.atlassian.com/display/JIRA/Advanced+Searching) for details. |
|
16 |
+ - `username` and `password` are optional, and may need to be specified if your Jira instance is read-protected |
|
17 |
+ - `timeout` is an optional parameter that specifies how long the request processing may take in minutes. |
|
18 | 18 |
|
19 | 19 |
The agent does periodic queries and emits the events containing the updated issues in JSON format. |
20 |
+ |
|
20 | 21 |
NOTE: upon the first execution, the agent will fetch everything available by the JQL query. So if it's not desirable, limit the `jql` query by date. |
21 | 22 |
MD |
22 | 23 |
|
@@ -4,7 +4,7 @@ module Agents |
||
4 | 4 |
cannot_receive_events! |
5 | 5 |
|
6 | 6 |
description <<-MD |
7 |
- Use this Agent to manually create Events for testing or other purposes. |
|
7 |
+ The Manual Event Agent is used to manually create Events for testing or other purposes. |
|
8 | 8 |
MD |
9 | 9 |
|
10 | 10 |
event_description "User determined" |
@@ -6,8 +6,9 @@ module Agents |
||
6 | 6 |
gem_dependency_check { defined?(MQTT) } |
7 | 7 |
|
8 | 8 |
description <<-MD |
9 |
+ The MQTT Agent allows both publication and subscription to an MQTT topic. |
|
10 |
+ |
|
9 | 11 |
#{'## Include `mqtt` in your Gemfile to use this Agent!' if dependencies_missing?} |
10 |
- The MQTT agent allows both publication and subscription to an MQTT topic. |
|
11 | 12 |
|
12 | 13 |
MQTT is a generic transport protocol for machine to machine communication. |
13 | 14 |
|
@@ -9,6 +9,8 @@ module Agents |
||
9 | 9 |
cannot_be_scheduled! |
10 | 10 |
|
11 | 11 |
description <<-MD |
12 |
+ The PDF Info Agent returns the metadata contained within a given PDF file, using HyPDF. |
|
13 |
+ |
|
12 | 14 |
#{'## Include the `hypdf` gem in your `Gemfile` to use PDFInfo Agents.' if dependencies_missing?} |
13 | 15 |
|
14 | 16 |
In order for this agent to work, you need to have [HyPDF](https://devcenter.heroku.com/articles/hypdf) running and configured. |
@@ -5,15 +5,13 @@ module Agents |
||
5 | 5 |
cannot_be_scheduled! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
- Use a PeakDetectorAgent to watch for peaks in an event stream. When a peak is detected, the resulting Event will have a payload message of `message`. You can include extractions in the message, for example: `I saw a bar of: {{foo.bar}}`, have a look at the [Wiki](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) for details. |
|
8 |
+ The Peak Detector Agent will watch for peaks in an event stream. When a peak is detected, the resulting Event will have a payload message of `message`. You can include extractions in the message, for example: `I saw a bar of: {{foo.bar}}`, have a look at the [Wiki](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) for details. |
|
9 | 9 |
|
10 | 10 |
The `value_path` value is a [JSONPaths](http://goessner.net/articles/JsonPath/) to the value of interest. `group_by_path` is a hash path that will be used to group values, if present. |
11 | 11 |
|
12 | 12 |
Set `expected_receive_period_in_days` to the maximum amount of time that you'd expect to pass between Events being received by this Agent. |
13 | 13 |
|
14 |
- You may set `window_duration_in_days` to change the default memory window length of `14` days, |
|
15 |
- `min_peak_spacing_in_days` to change the default minimum peak spacing of `2` days (peaks closer together will be ignored), and |
|
16 |
- `std_multiple` to change the default standard deviation threshold multiple of `3`. |
|
14 |
+ You may set `window_duration_in_days` to change the default memory window length of `14` days, `min_peak_spacing_in_days` to change the default minimum peak spacing of `2` days (peaks closer together will be ignored), and `std_multiple` to change the default standard deviation threshold multiple of `3`. |
|
17 | 15 |
MD |
18 | 16 |
|
19 | 17 |
event_description <<-MD |
@@ -7,7 +7,7 @@ module Agents |
||
7 | 7 |
default_schedule "never" |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
- A PostAgent receives events from other agents (or runs periodically), merges those events with the [Liquid-interpolated](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) contents of `payload`, and sends the results as POST (or GET) requests to a specified url. To skip merging in the incoming event, but still send the interpolated payload, set `no_merge` to `true`. |
|
10 |
+ A Post Agent receives events from other agents (or runs periodically), merges those events with the [Liquid-interpolated](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) contents of `payload`, and sends the results as POST (or GET) requests to a specified url. To skip merging in the incoming event, but still send the interpolated payload, set `no_merge` to `true`. |
|
11 | 11 |
|
12 | 12 |
The `post_url` field must specify where you would like to send requests. Please include the URI scheme (`http` or `https`). |
13 | 13 |
|
@@ -7,13 +7,15 @@ module Agents |
||
7 | 7 |
default_schedule "every_2m" |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
+ The Public Transport Request Agent generates Events based on NextBus GPS transit predictions. |
|
11 |
+ |
|
10 | 12 |
Specify the following user settings: |
11 | 13 |
|
12 |
- * stops (array) |
|
13 | 14 |
* agency (string) |
15 |
+ * stops (array) |
|
14 | 16 |
* alert_window_in_minutes (integer) |
15 | 17 |
|
16 |
- This Agent generates Events based on NextBus GPS transit predictions. First, select an agency by visiting [http://www.nextbus.com/predictor/agencySelector.jsp](http://www.nextbus.com/predictor/agencySelector.jsp) and finding your transit system. Once you find it, copy the part of the URL after `?a=`. For example, for the San Francisco MUNI system, you would end up on [http://www.nextbus.com/predictor/stopSelector.jsp?a=**sf-muni**](http://www.nextbus.com/predictor/stopSelector.jsp?a=sf-muni) and copy "sf-muni". Put that into this Agent's agency setting. |
|
18 |
+ First, select an agency by visiting [http://www.nextbus.com/predictor/agencySelector.jsp](http://www.nextbus.com/predictor/agencySelector.jsp) and finding your transit system. Once you find it, copy the part of the URL after `?a=`. For example, for the San Francisco MUNI system, you would end up on [http://www.nextbus.com/predictor/stopSelector.jsp?a=**sf-muni**](http://www.nextbus.com/predictor/stopSelector.jsp?a=sf-muni) and copy "sf-muni". Put that into this Agent's agency setting. |
|
17 | 19 |
|
18 | 20 |
Next, find the stop tags that you care about. To find the tags for the sf-muni system, for the N route, visit this URL: |
19 | 21 |
[http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=sf-muni&r=**N**](http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=sf-muni&r=N) |
@@ -6,7 +6,7 @@ module Agents |
||
6 | 6 |
API_URL = 'https://api.pushover.net/1/messages.json' |
7 | 7 |
|
8 | 8 |
description <<-MD |
9 |
- The PushoverAgent receives and collects events and sends them via push notification to a user/group. |
|
9 |
+ The Pushover Agent receives and collects events and sends them via push notification to a user/group. |
|
10 | 10 |
|
11 | 11 |
**You need a Pushover API Token:** [https://pushover.net/apps/build](https://pushover.net/apps/build) |
12 | 12 |
|
@@ -13,7 +13,7 @@ module Agents |
||
13 | 13 |
|
14 | 14 |
description do |
15 | 15 |
<<-MD |
16 |
- This Agent consumes RSS feeds and emits events when they change. |
|
16 |
+ The RSS Agent consumes RSS feeds and emits events when they change. |
|
17 | 17 |
|
18 | 18 |
This Agent is fairly simple, using [feed-normalizer](https://github.com/aasmith/feed-normalizer) as a base. For complex feeds |
19 | 19 |
with additional field types, we recommend using a WebsiteAgent. See [this example](https://github.com/cantino/huginn/wiki/Agent-configuration-examples#itunes-trailers). |
@@ -13,7 +13,7 @@ module Agents |
||
13 | 13 |
cattr_reader :second_precision_enabled |
14 | 14 |
|
15 | 15 |
description <<-MD |
16 |
- This agent periodically takes an action on target Agents according to a user-defined schedule. |
|
16 |
+ The Scheduler Agent periodically takes an action on target Agents according to a user-defined schedule. |
|
17 | 17 |
|
18 | 18 |
# Action types |
19 | 19 |
|
@@ -7,10 +7,9 @@ module Agents |
||
7 | 7 |
cannot_be_scheduled! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
- The SentimentAgent generates `good-bad` (psychological valence or happiness index), `active-passive` (arousal), |
|
11 |
- and `strong-weak` (dominance) score. It will output a value between 1 and 9. It will only work on English content. |
|
10 |
+ The Sentiment Agent generates `good-bad` (psychological valence or happiness index), `active-passive` (arousal), and `strong-weak` (dominance) score. It will output a value between 1 and 9. It will only work on English content. |
|
12 | 11 |
|
13 |
- Make sure the content this agent is analyzing have sufficient length to get respectable results. |
|
12 |
+ Make sure the content this agent is analyzing is of sufficient length to get respectable results. |
|
14 | 13 |
|
15 | 14 |
Provide a JSONPath in `content` field where content is residing and set `expected_receive_period_in_days` to the maximum number of days you would allow to be passed between events being received by this agent. |
16 | 15 |
MD |
@@ -9,7 +9,7 @@ module Agents |
||
9 | 9 |
end |
10 | 10 |
|
11 | 11 |
description <<-MD |
12 |
- The ShellCommandAgent can execute commands on your local system, returning the output. |
|
12 |
+ The Shell Command Agent will execute commands on your local system, returning the output. |
|
13 | 13 |
|
14 | 14 |
`command` specifies the command to be executed, and `path` will tell ShellCommandAgent in what directory to run this command. |
15 | 15 |
|
@@ -8,22 +8,19 @@ module Agents |
||
8 | 8 |
gem_dependency_check { defined?(Slack) } |
9 | 9 |
|
10 | 10 |
description <<-MD |
11 |
+ The Slack Agent lets you receive events and send notifications to [Slack](https://slack.com/). |
|
12 |
+ |
|
11 | 13 |
#{'## Include `slack-notifier` in your Gemfile to use this Agent!' if dependencies_missing?} |
12 |
- The SlackAgent lets you receive events and send notifications to [Slack](https://slack.com/). |
|
13 | 14 |
|
14 |
- To get started, you will first need to setup an incoming webhook. |
|
15 |
- Go to, <code>https://<em>your_team_name</em>.slack.com/services/new/incoming-webhook</code>, |
|
16 |
- choose a default channel and add the integration. |
|
15 |
+ To get started, you will first need to configure an incoming webhook. |
|
16 |
+ |
|
17 |
+ - Go to `https://my.slack.com/services/new/incoming-webhook`, choose a default channel and add the integration. |
|
17 | 18 |
|
18 |
- Your webhook URL will look like: <code>https://hooks.slack.com/services/<em>random1</em>/<em>random2</em>/<em>token</em></code> |
|
19 |
+ Your webhook URL will look like: `https://hooks.slack.com/services/some/random/characters` |
|
19 | 20 |
|
20 |
- Once the webhook has been setup it can be used to post to other channels or ping team members. |
|
21 |
- To send a private message to team-mate, assign his username as `@username` to the channel option. |
|
22 |
- To communicate with a different webhook on slack, assign your custom webhook name to the webhook option. |
|
23 |
- Messages can also be formatted using [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid). |
|
21 |
+ Once the webhook has been configured, it can be used to post to other channels or direct to team members. To send a private message to team member, use their @username as the channel. Messages can be formatted using [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid). |
|
24 | 22 |
|
25 |
- Finally, you can set a custom icon for this webhook in `icon`, either as [emoji](http://unicodey.com/emoji-data/table.htm) or an URL to an image. |
|
26 |
- Leaving this field blank will use the default icon for a webhook. |
|
23 |
+ Finally, you can set a custom icon for this webhook in `icon`, either as [emoji](http://www.emoji-cheat-sheet.com) or an URL to an image. Leaving this field blank will use the default icon for a webhook. |
|
27 | 24 |
MD |
28 | 25 |
|
29 | 26 |
def default_options |
@@ -3,7 +3,9 @@ module Agents |
||
3 | 3 |
cannot_receive_events! |
4 | 4 |
|
5 | 5 |
description <<-MD |
6 |
- This StubHubAgent creates an event for a given StubHub Event. It can be used to track how many tickets are available for the event and the minimum and maximum price. All that is required is that you paste in the url from the actual event, e.g. http://www.stubhub.com/outside-lands-music-festival-tickets/outside-lands-music-festival-3-day-pass-san-francisco-golden-gate-park-polo-fields-8-8-2014-9020701/ |
|
6 |
+ The StubHub Agent creates an event for a given StubHub Event. |
|
7 |
+ |
|
8 |
+ It can be used to track how many tickets are available for the event and the minimum and maximum price. All that is required is that you paste in the url from the actual event, e.g. http://www.stubhub.com/outside-lands-music-festival-tickets/outside-lands-music-festival-3-day-pass-san-francisco-golden-gate-park-polo-fields-8-8-2014-9020701/ |
|
7 | 9 |
MD |
8 | 10 |
|
9 | 11 |
event_description <<-MD |
@@ -3,8 +3,10 @@ module Agents |
||
3 | 3 |
cannot_be_scheduled! |
4 | 4 |
|
5 | 5 |
description <<-MD |
6 |
- You can use Translation Agent to translate text between natural languages. |
|
6 |
+ The Translation Agent will attempt to translate text between natural languages. |
|
7 |
+ |
|
7 | 8 |
Services are provided using Microsoft Translator. You can [sign up](https://datamarket.azure.com/dataset/bing/microsofttranslator) and [register your application](https://datamarket.azure.com/developer/applications/register) to get `client_id` and `client_secret` which are required to use this agent. |
9 |
+ |
|
8 | 10 |
`to` must be filled with a [translator language code](http://msdn.microsoft.com/en-us/library/hh456380.aspx). |
9 | 11 |
|
10 | 12 |
Specify what you would like to translate in `content` field, you can use [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) specify which part of the payload you want to translate. |
@@ -5,7 +5,7 @@ module Agents |
||
5 | 5 |
VALID_COMPARISON_TYPES = %w[regex !regex field<value field<=value field==value field!=value field>=value field>value] |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
- Use a TriggerAgent to watch for a specific value in an Event payload. |
|
8 |
+ The Trigger Agent will watch for a specific value in an Event payload. |
|
9 | 9 |
|
10 | 10 |
The `rules` array contains hashes of `path`, `value`, and `type`. The `path` value is a dotted path through a hash in [JSONPaths](http://goessner.net/articles/JsonPath/) syntax. |
11 | 11 |
|
@@ -7,9 +7,9 @@ module Agents |
||
7 | 7 |
cannot_be_scheduled! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
- #{'## Include `tumblr_client` and `omniauth-tumblr` in your Gemfile to use this Agent!' if dependencies_missing?} |
|
10 |
+ The Tumblr Publish Agent publishes Tumblr posts from the events it receives. |
|
11 | 11 |
|
12 |
- The TumblrPublishAgent publishes Tumblr posts from the events it receives. |
|
12 |
+ #{'## Include `tumblr_client` and `omniauth-tumblr` in your Gemfile to use this Agent!' if dependencies_missing?} |
|
13 | 13 |
|
14 | 14 |
To be able to use this Agent you need to authenticate with Tumblr in the [Services](/services) section first. |
15 | 15 |
|
@@ -8,8 +8,9 @@ module Agents |
||
8 | 8 |
gem_dependency_check { defined?(Twilio) } |
9 | 9 |
|
10 | 10 |
description <<-MD |
11 |
+ The Twilio Agent receives and collects events and sends them via text message (up to 160 characters) or gives you a call when scheduled. |
|
12 |
+ |
|
11 | 13 |
#{'## Include `twilio-ruby` in your Gemfile to use this Agent!' if dependencies_missing?} |
12 |
- The TwilioAgent receives and collects events and sends them via text message (up to 160 characters) or gives you a call when scheduled. |
|
13 | 14 |
|
14 | 15 |
It is assumed that events have a `message`, `text`, or `sms` key, the value of which is sent as the content of the text message/call. You can use the EventFormattingAgent if your event does not provide these keys. |
15 | 16 |
|
@@ -5,8 +5,9 @@ module Agents |
||
5 | 5 |
cannot_be_scheduled! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
+ The Twitter Publish Agent publishes tweets from the events it receives. |
|
9 |
+ |
|
8 | 10 |
#{twitter_dependencies_missing if dependencies_missing?} |
9 |
- The TwitterPublishAgent publishes tweets from the events it receives. |
|
10 | 11 |
|
11 | 12 |
To be able to use this Agent you need to authenticate with Twitter in the [Services](/services) section first. |
12 | 13 |
|
@@ -5,8 +5,9 @@ module Agents |
||
5 | 5 |
cannot_receive_events! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
+ The Twitter Stream Agent follows the Twitter stream in real time, watching for certain keywords, or filters, that you provide. |
|
9 |
+ |
|
8 | 10 |
#{twitter_dependencies_missing if dependencies_missing?} |
9 |
- The TwitterStreamAgent follows the Twitter stream in real time, watching for certain keywords, or filters, that you provide. |
|
10 | 11 |
|
11 | 12 |
To follow the Twitter stream, provide an array of `filters`. Multiple words in a filter must all show up in a tweet, but are independent of order. |
12 | 13 |
If you provide an array instead of a filter, the first entry will be considered primary and any additional values will be treated as aliases. |
@@ -122,4 +123,4 @@ module Agents |
||
122 | 123 |
end |
123 | 124 |
end |
124 | 125 |
end |
125 |
-end |
|
126 |
+end |
@@ -5,8 +5,9 @@ module Agents |
||
5 | 5 |
cannot_receive_events! |
6 | 6 |
|
7 | 7 |
description <<-MD |
8 |
+ The Twitter User Agent follows the timeline of a specified Twitter user. |
|
9 |
+ |
|
8 | 10 |
#{twitter_dependencies_missing if dependencies_missing?} |
9 |
- The TwitterUserAgent follows the timeline of a specified Twitter user. |
|
10 | 11 |
|
11 | 12 |
To be able to use this Agent you need to authenticate with Twitter in the [Services](/services) section first. |
12 | 13 |
|
@@ -6,18 +6,15 @@ module Agents |
||
6 | 6 |
|
7 | 7 |
gem_dependency_check { defined?(Haversine) } |
8 | 8 |
|
9 |
- description do |
|
10 |
- <<-MD |
|
11 |
- #{'## Include `haversine` in your Gemfile to use this Agent!' if dependencies_missing?} |
|
12 |
- The UserLocationAgent creates events based on WebHook POSTS that contain a `latitude` and `longitude`. You can use the [POSTLocation](https://github.com/cantino/post_location) or [PostGPS](https://github.com/chriseidhof/PostGPS) iOS app to post your location. |
|
9 |
+ description do <<-MD |
|
10 |
+ The User Location Agent creates events based on WebHook POSTS that contain a `latitude` and `longitude`. You can use the [POSTLocation](https://github.com/cantino/post_location) or [PostGPS](https://github.com/chriseidhof/PostGPS) iOS app to post your location to `https://#{ENV['DOMAIN']}/users/#{user.id}/update_location/:secret` where `:secret` is specified in your options. |
|
13 | 11 |
|
12 |
+ #{'## Include `haversine` in your Gemfile to use this Agent!' if dependencies_missing?} |
|
14 | 13 |
|
15 |
- Your POST path will be `https://#{ENV['DOMAIN']}/users/#{user.id}/update_location/:secret` where `:secret` is specified in your options. |
|
14 |
+ If you want to only keep more precise locations, set `max_accuracy` to the upper bound, in meters. The default name for this field is `accuracy`, but you can change this by setting a value for `accuracy_field`. |
|
16 | 15 |
|
17 |
- If you want to only keep more precise locations, set `max_accuracy` to the upper bound, in meters. The default name for this field is `accuracy`, but you can change this by setting a value for `accuracy_field`. |
|
18 |
- |
|
19 |
- If you want to require a certain distance traveled, set `min_distance` to the minimum distance, in meters. Note that GPS readings and the measurement itself aren't exact, so don't rely on this for precision filtering. |
|
20 |
- MD |
|
16 |
+ If you want to require a certain distance traveled, set `min_distance` to the minimum distance, in meters. Note that GPS readings and the measurement itself aren't exact, so don't rely on this for precision filtering. |
|
17 |
+ MD |
|
21 | 18 |
end |
22 | 19 |
|
23 | 20 |
event_description <<-MD |
@@ -8,8 +8,9 @@ module Agents |
||
8 | 8 |
gem_dependency_check { defined?(Wunderground) && defined?(ForecastIO) } |
9 | 9 |
|
10 | 10 |
description <<-MD |
11 |
+ The Weather Agent creates an event for the day's weather at a given `location`. |
|
12 |
+ |
|
11 | 13 |
#{'## Include `forecast_io` and `wunderground` in your Gemfile to use this Agent!' if dependencies_missing?} |
12 |
- The WeatherAgent creates an event for the day's weather at a given `location`. |
|
13 | 14 |
|
14 | 15 |
You also must select `which_day` you would like to get the weather for where the number 0 is for today and 1 is for tomorrow and so on. Weather is only returned for 1 week at a time. |
15 | 16 |
|
@@ -3,23 +3,23 @@ module Agents |
||
3 | 3 |
cannot_be_scheduled! |
4 | 4 |
cannot_receive_events! |
5 | 5 |
|
6 |
- description do |
|
7 |
- <<-MD |
|
8 |
- Use this Agent to create events by receiving webhooks from any source. |
|
6 |
+ description do <<-MD |
|
7 |
+ The Webhook Agent will create events by receiving webhooks from any source. In order to create events with this agent, make a POST request to: |
|
9 | 8 |
|
10 |
- In order to create events with this agent, make a POST request to: |
|
11 |
- ``` |
|
12 |
- https://#{ENV['DOMAIN']}/users/#{user.id}/web_requests/#{id || '<id>'}/:secret |
|
13 |
- ``` where `:secret` is specified in your options. |
|
9 |
+ ``` |
|
10 |
+ https://#{ENV['DOMAIN']}/users/#{user.id}/web_requests/#{id || ':id'}/#{options['secret'] || ':secret'} |
|
11 |
+ ``` |
|
14 | 12 |
|
15 |
- Options: |
|
13 |
+ #{'The placeholder symbols above will be replaced by their values once the agent is saved.' unless id} |
|
16 | 14 |
|
17 |
- * `secret` - A token that the host will provide for authentication. |
|
18 |
- * `expected_receive_period_in_days` - How often you expect to receive |
|
19 |
- events this way. Used to determine if the agent is working. |
|
20 |
- * `payload_path` - JSONPath of the attribute in the POST body to be |
|
21 |
- used as the Event payload. If `payload_path` points to an array, |
|
22 |
- Events will be created for each element. |
|
15 |
+ Options: |
|
16 |
+ |
|
17 |
+ * `secret` - A token that the host will provide for authentication. |
|
18 |
+ * `expected_receive_period_in_days` - How often you expect to receive |
|
19 |
+ events this way. Used to determine if the agent is working. |
|
20 |
+ * `payload_path` - JSONPath of the attribute in the POST body to be |
|
21 |
+ used as the Event payload. If `payload_path` points to an array, |
|
22 |
+ Events will be created for each element. |
|
23 | 23 |
MD |
24 | 24 |
end |
25 | 25 |
|
@@ -14,7 +14,7 @@ module Agents |
||
14 | 14 |
UNIQUENESS_FACTOR = 3 |
15 | 15 |
|
16 | 16 |
description <<-MD |
17 |
- The WebsiteAgent scrapes a website, XML document, or JSON feed and creates Events based on the results. |
|
17 |
+ The Website Agent scrapes a website, XML document, or JSON feed and creates Events based on the results. |
|
18 | 18 |
|
19 | 19 |
Specify a `url` and select a `mode` for when to create Events based on the scraped data, either `all` or `on_change`. |
20 | 20 |
|
@@ -7,12 +7,13 @@ module Agents |
||
7 | 7 |
cannot_be_scheduled! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
+ The Weibo Publish Agent publishes tweets from the events it receives. |
|
11 |
+ |
|
10 | 12 |
#{'## Include `weibo_2` in your Gemfile to use this Agent!' if dependencies_missing?} |
11 |
- The WeiboPublishAgent publishes tweets from the events it receives. |
|
12 | 13 |
|
13 |
- You must first set up a Weibo app and generate an `acess_token` for the user to send statuses as. |
|
14 |
+ You must first set up a Weibo app and generate an `access_token` for the user that will be used for posting status updates. |
|
14 | 15 |
|
15 |
- Include that in options, along with the `app_key` and `app_secret` for your Weibo app. It's useful to also include the Weibo user id of the person to publish as. |
|
16 |
+ You'll use that `access_token`, along with the `app_key` and `app_secret` for your Weibo app. You must also include the Weibo User ID (as `uid`) of the person to publish as. |
|
16 | 17 |
|
17 | 18 |
You must also specify a `message_path` parameter: a [JSONPaths](http://goessner.net/articles/JsonPath/) to the value to tweet. |
18 | 19 |
|
@@ -7,8 +7,9 @@ module Agents |
||
7 | 7 |
cannot_receive_events! |
8 | 8 |
|
9 | 9 |
description <<-MD |
10 |
+ The Weibo User Agent follows the timeline of a specified Weibo user. It uses this endpoint: http://open.weibo.com/wiki/2/statuses/user_timeline/en |
|
11 |
+ |
|
10 | 12 |
#{'## Include `weibo_2` in your Gemfile to use this Agent!' if dependencies_missing?} |
11 |
- The WeiboUserAgent follows the timeline of a specified Weibo user. It uses this endpoint: http://open.weibo.com/wiki/2/statuses/user_timeline/en |
|
12 | 13 |
|
13 | 14 |
You must first set up a Weibo app and generate an `acess_token` to authenticate with. Provide that, along with the `app_key` and `app_secret` for your Weibo app in the options. |
14 | 15 |
|
@@ -3,9 +3,11 @@ module Agents |
||
3 | 3 |
cannot_be_scheduled! |
4 | 4 |
|
5 | 5 |
description <<-MD |
6 |
+ The `wit.ai` agent receives events, sends a text query to your `wit.ai` instance and generates outcome events. |
|
6 | 7 |
|
7 |
- `wit.ai` agent receives events, sends text query to your `wit.ai` instance and generates outcome events. Fill in `Server Access Token` of your `wit.ai` instance. Use [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) to fill query field. |
|
8 |
- `expected_receive_period_in_days` is the expected number of days by which agent should receive events. It helps in determining if the agent is working. |
|
8 |
+ Fill in `Server Access Token` of your `wit.ai` instance. Use [Liquid](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) to fill query field. |
|
9 |
+ |
|
10 |
+ `expected_receive_period_in_days` is the expected number of days by which agent should receive events. It helps in determining if the agent is working. |
|
9 | 11 |
MD |
10 | 12 |
|
11 | 13 |
event_description <<-MD |
@@ -9,12 +9,11 @@ module Agents |
||
9 | 9 |
gem_dependency_check { Devise.omniauth_providers.include?(:wunderlist) } |
10 | 10 |
|
11 | 11 |
description <<-MD |
12 |
- #{'## Include the `omniauth-wunderlist` gem in your `Gemfile` and set `WUNDERLIST_OAUTH_KEY` and `WUNDERLIST_OAUTH_SECRET` in your environment to use this Agent' if dependencies_missing?} |
|
12 |
+ The WunderlistAgent creates new Wunderlist tasks based on the incoming event. |
|
13 | 13 |
|
14 |
- The WunderlistAgent creates new new tasks based on the incoming event. |
|
14 |
+ #{'## Include the `omniauth-wunderlist` gem in your `Gemfile` and set `WUNDERLIST_OAUTH_KEY` and `WUNDERLIST_OAUTH_SECRET` in your environment to use this Agent' if dependencies_missing?} |
|
15 | 15 |
|
16 | 16 |
To be able to use this Agent you need to authenticate with Wunderlist in the [Services](/services) section first. |
17 |
- |
|
18 | 17 |
MD |
19 | 18 |
|
20 | 19 |
def default_options |
@@ -77,4 +76,4 @@ module Agents |
||
77 | 76 |
'X-Client-ID' => ENV["WUNDERLIST_OAUTH_KEY"] }} |
78 | 77 |
end |
79 | 78 |
end |
80 |
-end |
|
79 |
+end |
@@ -23,7 +23,7 @@ |
||
23 | 23 |
<% if @agent.new_record? %> |
24 | 24 |
<div class="form-group type-select"> |
25 | 25 |
<%= f.label :type %> |
26 |
- <%= f.select :type, options_for_select([['Select an Agent Type', 'Agent']] + Agent.types.map(&:to_s).sort.map {|type| [type.gsub(/^.*::/, ''), type] }, @agent.type), {}, :class => 'select2 form-control' %> |
|
26 |
+ <%= f.select :type, options_for_select([['Select an Agent Type', 'Agent', {title: ''}]] + Agent.types.map {|type| [type.name.gsub(/^.*::/, '').underscore.humanize.titleize, type, {title: h(Agent.build_for_type(type.name,current_user,{}).html_description.lines.first.strip)}] }, @agent.type), {}, :class => 'form-control' %> |
|
27 | 27 |
</div> |
28 | 28 |
<% end %> |
29 | 29 |
</div> |