When adding an article, the rule engine will be activated and apply the rules ordered by priority. At the first validated rule, the article is placed in the target category. If no rules match then the article will not have a category.
To manage the rules, go tothe configuration screen:
Click on the
Add rule button to add a rule:
A rule is:
The definition of a rule is a pseudo code whose result must be true or false.
Within the rule it is possible to refer to some attributes:
title: article title
text: article text content
url: article source URL
tags: article input tags
key: alias of the used API key
matches(validate a regular expression)
not ("foo" matches "bar")(does not validate a regular expression)
'Harry' ~ ' ' ~ 'Potter'will be
key in ["test", "bookmarklet"]
len(length of the character string) Example:
len(text) >= 100
Classify articles whose API key is “foo”:
key == "foo"
Classify articles with API key “foo” or “bar”:
key == "foo" || key == "bar" // Peut aussi s'écrire: key in ["foo", "bar"]
Classify articles with “foo” as tag:
"foo" in tags
Classify articles with titles containing “Amazon” and “Alexa”:
title matches "Amazon" and title matches "Alexa"
Classify items that come from CNN:
url matches "^https://edition.cnn.com"