From 42b02c47be9b285099203e44a2570636d4ca6f03 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 11 Sep 2026 14:47:10 +0200 Subject: krino: foundation — sexp reader, config language, init/new/check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/config/skel/krino.conf | 22 ++++++++++++++++++++++ internal/config/skel/template.conf | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 internal/config/skel/krino.conf create mode 100644 internal/config/skel/template.conf (limited to 'internal/config/skel') diff --git a/internal/config/skel/krino.conf b/internal/config/skel/krino.conf new file mode 100644 index 0000000..48780ea --- /dev/null +++ b/internal/config/skel/krino.conf @@ -0,0 +1,22 @@ +;; -*- mode: lisp -*- +;; vim: set ft=lisp : +;; +;; krino's main configuration. The syntax is explained in +;; docs/sexp-primer.md; every form is described in krino.conf(5). + +;; The directories to sort, in this order. Each NAME has its rules in +;; dirs/NAME.conf. Add one with: krino new NAME PATH +(include) + +;; Where the log goes. Remove the ";; " to change it. +;; (log "~/.local/state/krino/krino.log") + +;; Defaults for every directory; a directory's own file can override them. +;; (defaults +;; (case ignore) ; ignore | strict +;; (fold yes) ; yes: "spolka" matches "spółka" +;; (recursive no) +;; (min-age 2m) ; skip files modified in the last 2 minutes +;; (max-read 50M) ; no content extraction above this size +;; (busy ".part" ".aria2" ".crdownload") +;; (on-conflict suffix)) ; suffix | skip | overwrite diff --git a/internal/config/skel/template.conf b/internal/config/skel/template.conf new file mode 100644 index 0000000..867b681 --- /dev/null +++ b/internal/config/skel/template.conf @@ -0,0 +1,37 @@ +;; -*- mode: lisp -*- +;; vim: set ft=lisp : +;; +;; krino rules for one directory. The syntax is explained in +;; docs/sexp-primer.md; every form is described in krino.conf(5). + +(path "@PATH@") + +;; Settings for this directory; each overrides the defaults in krino.conf. +;; Remove the ";; " to use one. +;; (recursive no) ; yes: also sort files in subdirectories +;; (max-depth 3) ; with recursive: how deep to go +;; (case ignore) ; ignore | strict +;; (fold yes) ; yes: "spolka" matches "spółka" +;; (min-age 2m) ; skip files modified in the last 2 minutes +;; (max-read 50M) ; no content extraction above this size +;; (on-conflict suffix) ; suffix | skip | overwrite + +;; Files and directories to leave alone, in .gitignore syntax. +(ignore "*.part" "*.crdownload" "*.aria2" ".*") + +;; Rules run top to bottom. Every rule that matches a file adds its actions +;; to that file; (stop) ends the search for it. Some examples: + +;; (rule "invoices" +;; (when (type pdf) +;; (content "invoice" "faktura")) +;; (move "Invoices/{mtime:%Y}") +;; (stop)) + +;; (rule "images" +;; (when (type image)) +;; (move "Images")) + +;; (rule "old-packages" +;; (when (type package) (age > 30d)) +;; (delete)) -- cgit v1.3