diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-12 01:22:12 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-12 01:22:12 +0200 |
| commit | 3b36a48b7ce5a53a9366f3b31f94311f178e2553 (patch) | |
| tree | ecbb277ff916b719f2ee45fba017792b85d5faf9 /docs/design.md | |
| parent | 42b02c47be9b285099203e44a2570636d4ca6f03 (diff) | |
| download | krino-3b36a48b7ce5a53a9366f3b31f94311f178e2553.tar.gz krino-3b36a48b7ce5a53a9366f3b31f94311f178e2553.zip | |
krino: matching — scan, ignore, conditions, extraction, duplicates, explain, dry run
Diffstat (limited to 'docs/design.md')
| -rw-r--r-- | docs/design.md | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/design.md b/docs/design.md index ed77e8c..888ab34 100644 --- a/docs/design.md +++ b/docs/design.md @@ -204,8 +204,8 @@ decompose (ł ø đ ħ ß æ œ and their capitals) to ASCII. 2. Rules are evaluated in order. A matching rule adds its actions to the file's chain. `(stop)` on a matching rule ends evaluation for that file. 3. Tests have no side effects, so `and` / `or` evaluate their arguments - cheapest first: `type`, `name`, `path`, `size`, `age`, `matched`, then - `duplicate`, then `content`. Content is extracted at most once per file, + cheapest first: `type`, `size`, `age` and `matched`, then `name` and + `path`, then `duplicate`, then `content`. Content is extracted at most once per file, and only if evaluation reaches a `content` test. 4. If a file's text cannot be extracted, `content` is false and the plan shows a warning naming the rule that wanted it. @@ -330,6 +330,11 @@ name has to change, the log records the actual name. - Always ignored: every rule `DEST` that lies inside the root, the Trash, and the config directory. For a `DEST` with placeholders, the part before the first placeholder is ignored: `Work/Acme/{mtime:%Y}` ignores `Work/Acme/`. + Known limitation: a `DEST` whose *first* path component is itself a + placeholder (`{ext}`, `{mtime:%Y}`) has no static prefix, so nothing can be + excluded before the walk, and krino would re-examine its own output; plan 3 + closes this by treating a file already at its computed destination as a + no-op. - Skipped as busy: files newer than `min-age`, or with a `busy` sibling. ### 8.2 Display @@ -471,8 +476,10 @@ cmd/krino/ flags, subcommands, exit codes internal/sexp/ reader: syntax tree with positions and byte offsets internal/config/ syntax tree → typed config; validation; embedded template and defaults internal/cond/ condition tree: compile, cost ordering, evaluation, explain trace -internal/scan/ walking, gitignore matcher, busy detection -internal/extract/ text extraction and normalisation +internal/scan/ walking, busy detection +internal/ignore/ gitignore-compatible path matcher +internal/extract/ text extraction +internal/norm/ text normalisation: case, diacritics, white space internal/dup/ duplicate index internal/plan/ files × rules → chains; placeholders; conflicts; JSON internal/apply/ executing approved steps; cross-filesystem moves |
