Skip to content

Commit 19c9271

Browse files
committed
Simplified with match with var syntax
1 parent 1740f23 commit 19c9271

File tree

1 file changed

+19
-35
lines changed

1 file changed

+19
-35
lines changed

.beanhub/imports.yaml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,33 @@ inputs:
99
currency: "{{ currency | default('USD', true) }}"
1010

1111
imports:
12-
- name: DoorDash Food Delivery
13-
match:
14-
extractor:
15-
equals: "plaid"
16-
desc:
17-
prefix: "DD *DOORDASH"
18-
actions:
19-
- txn:
20-
flag: "{{ '!' if pending else '*' }}"
21-
payee: "{{ payee | default(omit, true) }}"
22-
narration: "DoorDash food delivery"
23-
postings:
24-
- account: "Expenses:FoodDelivery:DoorDash"
25-
amount:
26-
number: "{{ amount }}"
27-
currency: "{{ currency | default('USD', true) }}"
28-
- name: Netflix
29-
match:
12+
- name: Routines
13+
common_cond:
3014
extractor:
3115
equals: "plaid"
32-
desc: "Netflix"
33-
actions:
34-
- txn:
35-
flag: "{{ '!' if pending else '*' }}"
36-
payee: "{{ payee | default(omit, true) }}"
37-
narration: "Netflix subscription"
38-
postings:
39-
- account: "Expenses:Entertainment:StreamingService"
40-
amount:
41-
number: "{{ amount }}"
42-
currency: "{{ currency | default('USD', true) }}"
43-
- name: Comcast
4416
match:
45-
extractor:
46-
equals: "plaid"
47-
desc: "Comcast"
17+
- cond:
18+
desc:
19+
prefix: "DD *DOORDASH"
20+
vars:
21+
narration: DoorDash food delivery
22+
account: Expenses:FoodDelivery:DoorDash
23+
- cond:
24+
desc: "Netflix"
25+
vars:
26+
narration: Netflix subscription
27+
account: Expenses:Entertainment:StreamingService
28+
- cond:
29+
desc: "Comcast"
30+
vars:
31+
account: Expenses:Internet
4832
actions:
4933
- txn:
5034
flag: "{{ '!' if pending else '*' }}"
5135
payee: "{{ payee | default(omit, true) }}"
52-
narration: "Comcast internet service"
36+
narration: "{{ narration | default(desc, true) }}"
5337
postings:
54-
- account: "Expenses:Internet"
38+
- account: "{{ account }}"
5539
amount:
5640
number: "{{ amount }}"
5741
currency: "{{ currency | default('USD', true) }}"

0 commit comments

Comments
 (0)