Until now, all the rules have been used to determine an entry’s score. The “adjust-tags” rule (and the “mark” rule below) act on entries after their scores have been determined.
The adust-tags rule was inspired by John Kitchin’s article Scoring Elfeed Articles. He computes a score and adds one or two tags to entries whose score is sufficiently high. It always bothered me that elfeed-score couldn’t do that, so in build 0.4.3, I added this rule type. These will add or remove tags based on whether the entry’s score is above or below a given threshold.
adjust-tags rules are given by four properties:
:threshold
: The threshold at which the rule shall apply
This is defined by a cons cell (see cons cell in Emacs Lisp) of the form:
(switch . threshold)
switch
may be t
or nil
and threshold
is
the threshold against which each entry’s score shall be compared. If
switch
is t
, the rule applies if the score is greater
than or equal to threshold
; if switch
is nil
the rule
applies if score is less than or equal to threshold
.
:tags
: The tags to be added or removed
This is also given by a cons cell
(switch . tags)
If switch
is t
& the rule applies, tags
(either a
single tag or a list of tags) will be added to the entry; if
switch
is nil
, they will be removed
For example, the following rules:
(("adjust-tags" (:threshold (t . 1000) :tags (t . a)) (:threshold (nil . -1000) :tags (nil . b)))
will add the tag 'a
to all entries whose score is 1000 or more,
and remove tag 'b
from all entries whose score is -1000 or
less.