hledger/examples/csv/apps/ynab4-rtl.csv.rules
2025-11-23 09:55:35 -08:00

29 lines
616 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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