blob: 5b363df27b1a347fcc6fdbe852f5fa1642879d53 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
;; -*- mode: lisp -*-
;; vim: set ft=lisp :
;;
;; by-type.conf — file everything into one folder per type group.
;;
;; Demonstrates: (type ...) with the built-in type groups, (move ...), and
;; (stop) so a file already claimed by one rule is never moved again by a
;; later one. The six groups below happen not to overlap each other, but
;; krino's type groups can (a .json file is both "code" and "text", for
;; instance — see TYPE GROUPS in krino.conf(5)), so (stop) is worth keeping
;; once you add rules of your own.
;;
;; To use: copy this to dirs/<name>.conf, fix (path ...) below, and add
;; <name> to (include ...) in krino.conf — or just run:
;; krino new <name> ~/wherever
;; and paste the (rule ...) forms in below the generated header. 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 "images"
(when (type image))
(move "Filed/Images")
(stop))
(rule "documents"
(when (type document))
(move "Filed/Documents")
(stop))
(rule "spreadsheets"
(when (type spreadsheet))
(move "Filed/Spreadsheets")
(stop))
(rule "presentations"
(when (type presentation))
(move "Filed/Presentations")
(stop))
(rule "archives"
(when (type archive))
(move "Filed/Archives")
(stop))
(rule "audio-video"
(when (or (type audio) (type video)))
(move "Filed/Media")
(stop))
|