Tom's Gravity Pages
Looking for the RULE EXAMPLES?
Briefly, rules are created by combining a set of conditions with a set of actions. The combinations are limited by your imagination and experience. You should spend a little time browsing the rules editing tabs by going to the menu item, TOOLS - RULES (Screen shot - new window). Select EDIT or ADD to enter the rules editing area.
The CONDITIONS tab (Screen shot - new window) is where the rule conditions are entered. Note the drop-down lists. The DOES NOT condition is often overlooked. Also note the long rectangular ADD CONDITION button in the center of the tab. To create a rule you select a condition and click ADD CONDITION. Above that there is a checkbox to use a regular expression. You can add and combine as many conditions as you like, but you must use the ADD CONDITION button to add each condition or boolean expression.
If you select the ACTIONS tab (Screen shot - new window) you will see that you can use rules to mark an article as read (or important, unread or whatever), append the article to a text file, add to the score, forward by email, play a sound, display a message, discard it, add to watch or ignore list and so on.
|NOTE: If more than one article is selected the rule applies only to the selection. If one article (or none) is selected the rule applies to ALL articles in the group.|
Rules are used when an action is to be performed. One common action (but by no means the only one) is to exclude articles from the list by marking them read or by discarding them entirely.
Scoring is used to draw to your attention things that you want to see. Other than coloring the threads scoring does not change the article list or perform any other action.
Display filters give different perspectives or views of a group without performing actions or changing the article list.
Not Lines > 290
You can paste text from news articles or text files to the rules conditions window. I like to keep notepad or Editpad open and copy and paste from that.
The standard windows keystrokes work in the rules conditions window.
You can export your rules to a text file. If you copy one of the rules to a text file it can be imported. You frequently see rules posted this way in a newsgroup. Just copy it to a text file (any extension) and import it from Gravity. This makes a nice way to email a rule to someone. Both functions are on the opening rule dialogue box. The export creates a script containing rules like this:
rule = Forward to Work enabled = No allgroups = No begin groups MediaOne.test end groups begin condition Marked as tagged for download end condition begin actions forwardTo email@example.com markAsRead fetchBody end actions end rule
Top of page
Currently you can search:
- The Subject line
- The article Body
Note that each condition has a "not" condition. This is often overlooked. In other words, you can specify
"Subject does not contain"Rather than"Subject contains"
Currently the "Header contains" condition searches
- Message ID
The message ID will allow you to match articles posted from certain hosts, provided they append their ID string to the end of the Message ID.
Here is one of my message ID's.<MPG.firstname.lastname@example.org>Every time I post from the pompano server the following string is appended. Gravity inserts the MPG.@news.pompano.net
You can search for this string, or parts of it.
No, unless you use a certain syntax in regular expressions. To specify case in regular expressions you must enclose the letter(s) in brackets. If you want to find the word "Fred" and not "fred" the regular expression would be [F]red. The way I target an all-caps word like FRED is with a regular expression like [F][R][E][D].
No, unless you modify the search phrase. For example, searching for "and" in the subject would also hit words like command, hand, dandy. Many times this is not a problem but it may be good to be aware of. On my regular expressions example page I show one way of finding a complete word with regular expressions.
They are used when you want to ..
- specify upper or lower case for the target.
- specify the position of the target within the string.
- match a range or exact count of characters
- use wild cards or optional phrases
Top of page
Test rules first to see the results before using them. Under rule actions, set the action to something like mark article as important, or tag for download. That way you will see exactly which articles will be hit. When you are satisfied that the rule works as expected change the action to the one you want (mark read, discard, tag).
Note: If you are storing bodies locally you can't use tag because you can't tag an article that has a body. Also if you are testing be careful about adding to an article's score. Scoring can color the thread not just the individual article. That is why it is better to tag when testing.
Top of page