diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-13 02:31:32 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-13 02:31:32 +0200 |
| commit | 26c94eb3db62ec6eebbf8d22c11afe691d9520c4 (patch) | |
| tree | 165e5bf69234b4f96c9b74deb4898d7143ddf120 /examples/invoices.conf | |
| parent | a6e442a645902011b2081c216daaec052cdc6ce6 (diff) | |
| download | krino-0.0.1.tar.gz krino-0.0.1.zip | |
krino: release 0.0.1 — man pages, install, examples, cross and release, README, changelogv0.0.1
Also: undo removes the directories its run created; a hardlink is never a
duplicate of its own other name; a flag written before "undo" is honoured;
--version prints no leading v. Duplicate conditions with different scopes
not sharing an original is documented as a known limitation.
Diffstat (limited to 'examples/invoices.conf')
| -rw-r--r-- | examples/invoices.conf | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/invoices.conf b/examples/invoices.conf new file mode 100644 index 0000000..9fca018 --- /dev/null +++ b/examples/invoices.conf @@ -0,0 +1,33 @@ +;; -*- mode: lisp -*- +;; vim: set ft=lisp : +;; +;; invoices.conf — file invoices by content, into a folder per year. +;; +;; Demonstrates: (content ...) matching text pulled out of PDFs and other +;; documents (see krino.conf(5), CONTENT EXTRACTION), and the {mtime:%Y} +;; placeholder in a (move ...) destination. +;; +;; 0000000000 below is a placeholder, not an issued Polish NIP — no such +;; number is ever assigned. The conditions in (when ...) must all hold, and +;; one (content ...) is true when any of its keywords appears, so the rule +;; needs a keyword AND the number. Replace the number with your supplier's +;; or your own NIP to narrow the rule to that tax number, or delete the +;; (content "0000000000") condition to match on keywords alone. +;; +;; To use: copy this to dirs/<name>.conf, fix (path ...) below, and add +;; <name> to (include ...) in krino.conf. A short tutorial on the syntax is +;; docs/sexp-primer.md in the source repository, installed alongside this +;; file at $PREFIX/share/doc/krino/sexp-primer.md; every form is described +;; in krino.conf(5). + +(path "~/Downloads") ; CHANGE THIS to the directory to sort + +;; Leave partial downloads and dotfiles alone. +(ignore "*.part" "*.crdownload" "*.aria2" ".*") + +(rule "acme-invoices" + (when (type document) + (content "faktura" "invoice") + (content "0000000000")) ; 0000000000: fake NIP, see above + (move "Filed/Invoices/{mtime:%Y}") + (stop)) |
