Agent Categories The Category Buffer
A category consists of two things.
A predicate consists of predicates with logical operators sprinkled in between.
Perhaps some examples are in order.
Here's a simple predicate. (It's the default predicate, in fact, used for all groups that don't belong to any other category.)
Quite simple, eh? This predicate is true if and only if the article is short (for some value of ``short'').
Here's a more complex predicate:
(or high (and (not low) (not long)))
This means that an article should be downloaded if it has a high score, or if the score is not low and the article is not long. You get the drift.
The available logical operators are
not. (If you prefer, you can use the more ``C''-ish operators
The following predicates are pre-defined, but if none of these fit what you want to do, you can write your own.
True iff the article is shorter than
True iff the article is longer than
True iff the article has a download score less than
True iff the article has a download score greater than
True iff the Gnus Agent guesses that the article is spam. The heuristics may change over time, but at present it just computes a checksum and sees whether articles match.
If you want to create your own predicate function, here's what you have
to know: The functions are called with no parameters, but the
gnus-score dynamic variables are bound to
Now, the syntax of the download score is the same as the syntax of
normal score files, except that all elements that require actually
seeing the article itself are verboten. This means that only the
following headers can be scored on: