extra: simplify, fix mint CSV rules

This commit is contained in:
Simon Michael 2016-10-23 14:34:37 -07:00
parent 99b13544df
commit 97e7fd67f4
2 changed files with 20 additions and 41 deletions

View File

@ -1,19 +0,0 @@
# hledger csv conversion rules v2
# mint.com
account1 assets:personal:bank:wells fargo:checking
# 0 1 2 3 4 5 6 7 8
#"Date","Description","Original Description","Amount","Transaction Type","Category","Account Name","Labels","Notes"
fields date, shortdesc, origdesc, amount, txntype, category, account, labels, notes
date-format %-m/%-d/%Y
skip 1
currency $
description: %shortdesc - %origdesc %category %account - %txntype
account2: expenses:personal:%category
if Home Improvement
account2: expenses:personal:home:home care

42
extra/csv-rules/mint.csv.rules Normal file → Executable file
View File

@ -1,25 +1,23 @@
# csv conversion rules file generated by hledger 0.12.98+40
# Add rules to this file for more accurate conversion, see
# http://hledger.org/MANUAL.html#convert
# hledger csv conversion rules v2
# mint.com
#mint.com: "Date","Description","Original Description","Amount","Transaction Type","Category","Account Name","Labels","Notes"
#fields "Date","Description","Original Description","Amount","Transaction Type","Category","Account Name","Labels","Notes"
#account assets:personal:bank:checking
account1 assets:personal:bank:wells fargo:checking
date-field 0
description-field 1
amount-field 3
base-account assets:personal:bank:checking
# 0 1 2 3 4 5 6 7 8
#"Date","Description","Original Description","Amount","Transaction Type","Category","Account Name","Labels","Notes"
fields date, shortdesc, origdesc, amount, txntype, category, account, labels, notes
date-format %-m/%-d/%Y
skip 1
currency $
#
# account-assigning rules
#
# SPECTRUM
# expenses:personal:health:gym
#
# ITUNES
# BLKBSTR=BLOCKBUSTER
# expenses:personal:entertainment
#
# (TO|FROM) SAVINGS
# assets:personal:bank:savings
# hopefully "debit" only appears in Transaction Type field
if debit
amount -%amount
description: %shortdesc - %origdesc %category %account - %txntype
account2: expenses:personal:%category
if Home Improvement
account2: expenses:personal:home:home care