~justusw/convert-statement

Convert bank and credit card statements into a GnuCash friendly format
e0846d32 — Justus Perlwitz 8 months ago
Add test helper
b76458af — Justus Perlwitz 8 months ago
Ignore all toml
4069f575 — Justus Perlwitz 8 months ago
Support SMBC Card

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~justusw/convert-statement
read/write
git@git.sr.ht:~justusw/convert-statement

You can also use your local clone with git send-email.

#DKB-Convert

Create config.toml with contents, while making sure that in_dir and out_dir do not point to the same or overlapping path.

in_dir = "IN_DIR"
out_dir = "OUT_DIR"

Put the files in the in folder so that you will have the following tree:

test/data/in
├── dkb_cc_von_bis_v1
│   └── 2022-10-06
│       └── transactions.csv
├── dkb_cc_zeitraum_v1
│   └── 2022-10-09
│       └── transaction.csv
├── dkb_giro_v1
│   └── 2022-10-06
│       └── transactions.csv
├── rakuten_v1
│   └── 2022-10-06
│       └── transactions.csv
├── shinsei_v1
│   └── 2022-10-06
│       └── transactions.csv
├── shinsei_v1_en
│   └── 2022-10-10
│       └── transactions.csv
├── shinsei_v2
│   └── 2022-10-06
│       └── transactions.csv
├── shinsei_v2_en
│   └── 2022-10-10
│       └── transactions.csv
├── shinsei_v3
│   └── 2022-10-06
│       └── transactions.csv
├── smbc_v1
│   └── 2022-10-06
│       └── transactions.csv
└── smbc_v2
    └── 2022-10-06
        └── transactions.csv

22 directories, 11 files

Regenerate this by running

tree test/data/in | pbcopy  # in macOS

Then run

pipenv run ./convert-statement.py

The output can be found in the out folder.

#Supported Banks

  • DKB (CC and Giro as of Aug 2022)
  • Shinsei (Format until Oct 2018)
  • Shinsei (Format until Nov 2021)
  • Shinsei (Current as of Aug 2022)
  • Rakuten Corporate (Format as of Aug 2022)
  • SMBC 普通預金 (Format until Jul 2022)
  • SMBC 普通預金 (Current as of Aug 2022)
  • SMBC Card (Current as of January 2023)

#SMBC Card (as of 2023-01-13)

The columns are

  • ご利用日
  • ご利用店名
  • ご利用金額
  • 支払区分
  • 今回回数
  • お支払い金額 -(お支払い総額)
    • 現地通貨額
    • 略称
  • (内手数料)
    • 換算レート
    • 換算日
  • 備考

#Testing

pipenv run python -m pytest
pipenv run bin/test.py
pipenv run flake8 .
pipenv run mypy