-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-cat
81 lines (71 loc) · 1.54 KB
/
example-cat
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This is a comment.
# Comments are only allowed outside cat definitions.
#
# The syntax of cat-regex-list definition is
# <cat_name> {
# <regex_1>
# <regex_2>
# }
# which makes <regex_1> and <regex_2> associated with <cat_name>, to be
# matched with the narration of each entries.
#
# The syntax of cat-hook definition is
# <already_defined_cat_name> <hook_type> {
# <hook_type_instr>
# <hook_type_instr>
# }
#
# The only reserved cat is __uncat__ which holds the entries uncaught by the
# user-defined cat(s). You can add hooks to it, but do not define a
# cat-regex-list for it!
food {
.*swiggy.*
.*tibet\s*kitchen.*
.*hotel\ foobar.*
}
groceries {
.*bigbasket.*
.*max\ hypermarket.*
}
transport {
.*uber.*
.*ola.*
.*makemytrip.*
}
shopping {
.*amazon.*
.*flipkart.*
}
# you can have empty cat-def too (if they are used by any hook)
misc {
}
cash_in_hand {
}
# overall hook
# ============
# The overall hook instructions affect only the final summary.
# For eg the instruction in __uncat__,
# donate misc debit_total 200
# does misc{debit_total} += 200, __uncat__{debit_total} -= 200
#
# donate
# ------
# donate <whom> <what> [amt]
# if amt is empty then the remainder amount will be donated
#
# del
# ---
# del <what> [amt]
# if amt is empty then the remainder amount will be deleted.
# local hook
# ==========
# The local hook instructions affect only the local summaries.
#
# hide
# ----
# hides this category completely
__uncat__ overall {
del debit_total 100
donate misc debit_total 200
donate cash_in_hand debit_total
}