;examples:csv: a YNAB 4 example, with workaround for RTL currency symbol

This commit is contained in:
Simon Michael 2024-10-21 12:38:21 -10:00
parent de9095792e
commit 717e86ff28
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,3 @@
"Account","Flag","Check Number","Date","Payee","Category","Master Category","Sub Category","Memo","Outflow","Inflow","Cleared","Running Balance"
"checking1",,,2022/11/07,"shop1",,,,"Lunch",د.ا.4.750,د.ا.0.000,C,د.ا.0.000
"creditcard1",,,2022/12/11,"coffeeshop",,,,"Coffee",د.ا.93.210,د.ا.0.000,C,د.ا.56.790
1 Account Flag Check Number Date Payee Category Master Category Sub Category Memo Outflow Inflow Cleared Running Balance
2 checking1 2022/11/07 shop1 Lunch د.ا.‏4.750 د.ا.‏0.000 C د.ا.‏0.000
3 creditcard1 2022/12/11 coffeeshop Coffee د.ا.‏93.210 د.ا.‏0.000 C د.ا.‏56.790

View File

@ -0,0 +1,28 @@
skip 1
fields account, flag, check_number, date, payee, category, master_category, sub_category, memo, outflow, inflow, cleared, running_balance
if %cleared C
status *
description %payee | %memo
account1 %account
#account2 %category
# the RTL currency symbol breaks these somehow
#amount-out %outflow
#amount-in %inflow
#balance1 %running_balance
#currency د.ا.
# so extract the amounts with regex groups
if %inflow ([0-9]+\.[0-9]+)
amount-in \1
if %outflow ([0-9]+\.[0-9]+)
amount-out \1
if %running_balance ([0-9]+\.[0-9]+)
balance1 \1
# and use the ISO-4217 code instead
currency JOD