aboutsummaryrefslogtreecommitdiff
path: root/man/krino.conf.5
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 14:08:36 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 14:08:36 +0200
commit1d3f2d1e4c59867024470d3444e12698b7ebb22e (patch)
tree4fa14f455c72f9b206a680dcc1b0f4c1f3708158 /man/krino.conf.5
parent07c24054cab965800983ef40f53a05c2db131ede (diff)
downloadkrino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.tar.gz
krino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.zip
0.0.4: max-size, exclude forms, --min-agev0.0.4
Diffstat (limited to 'man/krino.conf.5')
-rw-r--r--man/krino.conf.560
1 files changed, 59 insertions, 1 deletions
diff --git a/man/krino.conf.5 b/man/krino.conf.5
index a412e1d..769bd51 100644
--- a/man/krino.conf.5
+++ b/man/krino.conf.5
@@ -67,6 +67,7 @@ The main file, read first:
(log "~/.local/state/krino/krino.log") ; optional
(defaults ; optional; any setting below
(min-age 5m))
+(exclude (type iso)) ; optional, may repeat
.Ed
.Bl -tag -width Ds
.It Ic (include Ar name No ...)
@@ -84,6 +85,10 @@ Defaults for every directory; a directory's own file, and a rule inside
it, can override them.
See
.Sx SETTINGS .
+.It Ic (exclude Ar condition No ...)
+May repeat.
+Sets matching files aside in every directory; see
+.Sx EXCLUSIONS .
.El
.Ss dirs/name.conf
One file per configured directory:
@@ -91,6 +96,7 @@ One file per configured directory:
(path "~/downloads") ; required
(recursive no) ; any setting from SETTINGS
(ignore "*.part" "*.aria2" ".*") ; may repeat; patterns accumulate in order
+(exclude (name "^keep-")) ; may repeat
(rule "acme"
(when (type document)
@@ -126,6 +132,10 @@ re-includes; a pattern with no
.Ql /
matches at any depth; the last matching pattern wins.
An ignored directory is not descended into.
+.It Ic (exclude Ar condition No ...)
+May repeat.
+Sets matching files aside in this directory; see
+.Sx EXCLUSIONS .
.It Ic (rule Ar name item No ...)
See
.Sx RULES .
@@ -183,7 +193,10 @@ means the root only.
Built-in: unlimited.
.It Ic min-age
A duration.
-Files modified more recently are skipped as busy.
+Files modified more recently are skipped as too new.
+.Xr krino 1 Ns 's
+.Fl -min-age
+overrides it for one run.
Built-in:
.Sy 2m .
.It Ic max-read
@@ -191,6 +204,10 @@ A size.
No content is extracted from a file above this size.
Built-in:
.Sy 50M .
+.It Ic max-size
+A size.
+Files above it are skipped as too big: no rule sees them.
+Built-in: unlimited.
.It Ic busy
One or more suffixes.
A file is skipped when its own name with one of these suffixes appended
@@ -210,6 +227,47 @@ see
Built-in:
.Sy suffix .
.El
+.Sh EXCLUSIONS
+.Bd -literal -offset indent
+(exclude (type iso img)) ; by extension
+(exclude (name "^keep-")) ; by name
+(exclude (type pdf) (content "confidential")) ; by content
+.Ed
+.Pp
+An
+.Ic exclude
+form sets files aside before any rule sees them.
+Its conditions are those of
+.Sx CONDITIONS ,
+and all of them must hold, as in
+.Ic when ;
+a file matching any
+.Ic exclude
+form is excluded.
+Forms in
+.Pa krino.conf
+apply to every directory and are tested first, then the directory's own.
+They use the directory's
+.Ic case
+and
+.Ic fold .
+.Pp
+An excluded file is counted as excluded in the plan and listed, with the
+form that matched, under
+.Fl v ;
+.Ic krino explain
+traces every form, and
+.Ic krino check
+lists them.
+No rule has run yet, so
+.Ic (matched)
+is never true inside an
+.Ic exclude .
+Unlike
+.Ic ignore ,
+which never opens a file, an
+.Ic exclude
+can test size and content.
.Sh RULES
.Bd -literal -offset indent
(rule NAME ITEM...)