From 8c650e3ef667f47b13f3e34ca60a4001e0d743f0 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 2 Nov 2019 03:00:10 +0000 Subject: [PATCH] Update page 'Filtering' --- Filtering.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Filtering.md diff --git a/Filtering.md b/Filtering.md new file mode 100644 index 0000000..68cb096 --- /dev/null +++ b/Filtering.md @@ -0,0 +1,25 @@ +Filters can be used in several places, either in a Filter Stage to directly filter items in feeds, or as conditions for a Conditional Stage to control whether or not another pipeline stage is applied to an item. + +## Filters +A filter is a collection of [Rules](#rules) along with information about how they should collectively apply to an item. + +### `mode` +Either `accept` or `reject`. Accepting rules will allow any items that match the filter whereas rejecting rules will block any items that match. + +### `score` +Items with a score greater than or equal to the filter score are considered to match the filter. + +### `rules` +The array of rules, each of which will be checked against the RSS item. + +## Rules +Each rule has several pieces of data: + +### `mode` +Either `contains_string`, which checks if the property contains the string in the `param` field or `matches_regex`, which checks if the property matches the regular expression in the `param` field. + +### `property` +Which property of the RSS item the rule will check. One of `url`, `title`, or `author`. + +### `param` +The parameter of the rule. Usage depends on the rule's `mode`. \ No newline at end of file