Title: Actions #### Filters (tests)
Syntax Description Example Note
@_username_ Selects messages sent by a particular user @rhirsch
any Selects all messages regardless of their characteristics any
/_regex_/ Selects messages if body matches a regular expression /exception/
"_string_" Selects messages if body contains the case insensitive string "sales order"
\#_tag_ Selects the messages containing the tag. \#project gumbo Note the tag could be in the message as a hash code or created by the user directly as a tag
to = @_username_ Selects the messages that were sent to a particular user to = @rhirsch
to = (@_username1_, @_username2_) Selects the messages that were sent to multiple users. to = (@rhirsch, @m) List should be comma separated
to <> @_username_ Selects the messages that were not sent to a particular user to <> @rhirsch
not(_exp_) Selects the messages in which the expression evaluates to false not("sales order" )
_exp1_ \ _exp2_ Selects the messages in which either expression is true "sales order" \ "profit"
_exp1_ & _exp2_ Selects the messages in which both expressions are true "sales order" & "profit"
_number_% Returns messages based on the percentage. 44% For example, the 45% will be true 45% of the time.
#### Hooks (messages generated on system events)
Syntax Description Notes
login Selects the messages generated on user login.
follow Selects the messages generated when a user follows you. %f expands to follower nickname
unfollow Selects the messages generated when a user unfollows you. %f expands to ex-follower nickname
profile Selects the messages generated when your profile is changed.
every _number_ mins Generates messages at regular intervals and selects them. The message is not saved\- too noisy, plus two identical tests never refer to the same event
{info:title=User, followers' and public timelines} Messages generated by events can be used in the actions test expression, since the event cause is attached to them. Messages generated by events appear by default in the user's timeline, but not in follower's timeline. The message can be resent to followers using the existing *resend* action, or suppressed from user's own timeline by means of the *filter* action. Any and all saved messages appear in the public timeline (this could be addressed by these messages being private by default in the future). {info} \| #### Actions (performances) status=%s | Enter HTTP POST data on a new line; %s expands to original message, %u expands to user nickname, %i expands to image URL, %w expands to user's full (mnemonic: _w_ hole) name (first + last) | mailto:wille.coyote@acme.com | atom: _url://_ \\ rss: _url://_ | Posts the new entries from Atom/RSS feed | atom:[http://twitter.com/statuses/user_timeline/esmeproject.atom] | Bots can also post to Apache ESME, but polling from Apache ESME is more secure and robust | | scala | Interprets the text of a message as Scala code and returns back the result | action which interprets the text of a message as Scala \\ code and returns back the result | Details [here |Scala Action] | h4. Examples for assembling tests and actions || Test || Action || Description || Similar to || | follow | mailto: _mail_ | Sends mail when followed by any user | Twitter sends messages on follow | | unfollow | mailto: _mail_ | Sends mail when unfollowed by a user | Qwitter helps track who is unfollowing you | | profile | http:// _server_ | Sends HTTP POST when the profile is changed | @chinposin on Twitter tracks your avatar change to chinposin.com | | every 5 mins | rss:[http://blog.esme.us/feed/rss] | Updates new posts from the ESME blog | twitterfeed posts your blog titles to Twitter | | login | resend | Notifies your followers when you log in | Yammer notifies when a user logs in for the first time | | \#twitter & @me | [http://user:password@twitter.com/statuses/update.xml] \\ status=%s | Posts all messages tagged _\#twitter_ to Twitter | Identi.ca integrates with Twitter by reposting messages | | \#bot \| @bot | [http://localhost:8080/api/send_msg] \\ token=XXX&message=%u said: %s | Reposts customized message to the same ESME instance, possibly with a different user's credentials | twitterbots helps you retweet automatically | {warning:title=Too permissive action tests} Be careful, tests for the actions might apply to more messages than you think. For example, the tag filter applies not only to your messages, but also ones from people you're following. In the action above which posts to Twitter, if you forget to restrict the author, you might flood the twitter timeline with messages you didn't intend to post. {warning} \| h4. Additional Links There are many lists of ad-hoc Twitter third-party tools, some of which might be assembled in ESME using actions. * [http://tweeternet.com/] * [http://www.squidoo.com/twitterextensions]
Syntax Description Example Note
filter Filter the message out and don't put it in your mailbox filter
resend Resend the message to all your followers regardless of their characteristics resend It will only be put in your followers timeline if it is not already there.
mailto: _email_ Send the body of the message to the email recipient {noformat}