diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 14:08:36 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 14:08:36 +0200 |
| commit | 1d3f2d1e4c59867024470d3444e12698b7ebb22e (patch) | |
| tree | 4fa14f455c72f9b206a680dcc1b0f4c1f3708158 /man | |
| parent | 07c24054cab965800983ef40f53a05c2db131ede (diff) | |
| download | krino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.tar.gz krino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.zip | |
0.0.4: max-size, exclude forms, --min-agev0.0.4
Diffstat (limited to 'man')
| -rw-r--r-- | man/krino.1 | 20 | ||||
| -rw-r--r-- | man/krino.conf.5 | 60 |
2 files changed, 77 insertions, 3 deletions
diff --git a/man/krino.1 b/man/krino.1 index a4ce2f9..458bd56 100644 --- a/man/krino.1 +++ b/man/krino.1 @@ -13,6 +13,7 @@ .Op Fl c Ar file .Op Fl P .Op Fl -no-color +.Op Fl -min-age Ar duration .Op Ar name ... .Pp .Nm @@ -129,6 +130,21 @@ faint. Print the plan straight out, never through .Ev PAGER . Without it, a plan taller than the terminal is shown through the pager. +.It Fl -min-age Ar duration +For this run only, skip files modified less than +.Ar duration +ago in every directory, in place of each directory's +.Ic min-age +.Pq Xr krino.conf 5 . +.Ar duration +is +.Sy 0 , +or an integer with one of +.Ql s m h d w ; +.Fl -min-age Cm 0 +considers even a file written a moment ago. +Also honoured by +.Ic explain . .It Fl h , Fl -help Print usage and exit. .It Fl -version @@ -163,7 +179,7 @@ in .Pa krino.conf , keeping its comments. .It Ic check Op Ar name ... -Validate the configuration, list each included directory's rules, and list +Validate the configuration, list each included directory's exclusions and rules, and list which content-extraction tools .Pq Xr krino.conf 5 , Sx CONTENT EXTRACTION are available. @@ -171,7 +187,7 @@ With no .Ar name , checks every included directory. .It Ic explain Ar file -Evaluate every rule of +Evaluate every exclusion and rule of .Ar file Ns 's directory against it and show each test's result, so a rule that should match but does not 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...) |
