Tom's Gravity Pages
[HOME] [INDEX]

Rules Rules Rules

Looking for the RULE EXAMPLES?


  1. Overview
  2. Applying Rules
  3. Rule Statistics
  4. When to use Rules - Scoring - Filters?
  5. Creating Rules
  6. What Can I Search?
  7. What Headers Can I Search?
  8. Are Search Strings Case Sensitive?
  9. Does A Search Phrase Count As A Whole Word?
  10. When To Use Regular Expressions?
  11. Testing Rules.
  12. Rule Examples

OVERVIEW

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.

Conditions

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.

Actions

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.

General Tips

Rules can apply to individual newsgroups. If you look on the GENERAL tab (Screen shot - new window) you will see that you can make a rule apply to a single group, a list of groups, or all groups. Suppose you create a rule to discard all articles less than 300 lines for binary groups. This rule would also discard all articles in your discussion groups. The solution is to apply the rule to selected groups. If you are familiar with wildcards, you can use them (ie *binaries*).

APPLYING RULES

There are two methods of applying rules.

Rule Statistics

For those of you who want to keep track of what is going on, go to VIEW - RULE STATISTICS to see how many times your rules fire.

WHEN TO RULE - SCORE - FILTER?

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.


CREATING RULES

General Tips

Top of page


WHAT CAN I SEARCH?

Currently you can search:

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"

WHAT HEADERS CAN I SEARCH?

Currently the "Header contains" condition searches

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.11f10c80d798ef609896a8@news.pompano.net>
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.


ARE SEARCH STRINGS CASE SENSITIVE?

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].

DOES A SEARCH PHRASE COUNT AS A WHOLE WORD?

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.

WHEN TO USE REGULAR EXPRESSIONS?

They are used when you want to ..

Top of page


TESTING RULES.

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