From 3b9ff1267706569aa5ac6553e2ccead4a8f3e058 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Fri, 29 Mar 2024 22:51:36 +0100 Subject: [PATCH] add rules files to parse csv bank exports --- README.md | 7 +++++++ import/expenses.csv.rules | 14 ++++++++++++++ import/member-donations.csv.rules | 16 ++++++++++++++++ import/non-member-donations.csv.rules | 16 ++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 import/expenses.csv.rules create mode 100644 import/member-donations.csv.rules create mode 100644 import/non-member-donations.csv.rules diff --git a/README.md b/README.md index 1389809..8c1975b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ td:nth-child(1) { white-space:nowrap; } tr:nth-child(even) td { background-color:#eee; }

Income Statement 2023-01-01..2024-12-31

Commodity20232024Total
 
Revenues
415.00280.00695.00
87.0050.00137.00
total502.00330.00832.00
 
Expenses
52.40052.40
26.022.2428.26
124.4788.06212.53
total202.8990.30293.19
 
Net:299.11239.70538.81
+### Import new statements + +* place csv file into import directory + * rename to `expenses.csv` for expenses or + * rename to `donations-member.csv` for donations of members + * rename to `donations-non-member.csv` for donations of non-members +* execute `hledger import -f finances.hledger import/` ### Quick start how to use hledger diff --git a/import/expenses.csv.rules b/import/expenses.csv.rules new file mode 100644 index 0000000..34c848b --- /dev/null +++ b/import/expenses.csv.rules @@ -0,0 +1,14 @@ +skip 1 + +separator ; + +fields , , , , date, , , , , , description, amount + +date-format %d.%m.%Y + +currency € + +decimal-mark , + +account1 expenses:infra +account2 assets:bank diff --git a/import/member-donations.csv.rules b/import/member-donations.csv.rules new file mode 100644 index 0000000..aab469b --- /dev/null +++ b/import/member-donations.csv.rules @@ -0,0 +1,16 @@ +skip 1 + +separator ; + +fields , , , , date, , , , , , description, amount + +date-format %d.%m.%Y + +currency € + +decimal-mark , + +account1 assets:bank +account2 income:donations:member + +description donation of member diff --git a/import/non-member-donations.csv.rules b/import/non-member-donations.csv.rules new file mode 100644 index 0000000..8a041f9 --- /dev/null +++ b/import/non-member-donations.csv.rules @@ -0,0 +1,16 @@ +skip 1 + +separator ; + +fields , , , , date, , , , , , description, amount + +date-format %d.%m.%Y + +currency € + +decimal-mark , + +account1 assets:bank +account2 income:donations:non-member + +description donation of non-member -- 2.44.2