Parse Hang Seng eStatements to Beancount/CSV
Project description
Beancount/CSV parser for HK Bank Accounts
Few Hong Kong Banks provide structured formatted (CSVs, OFX, etc) electronic statements to users, usually only PDFs are available (unless you're a Business-tier user).
This package parses PDF eStatements from some of the HK Banks, and output results as beancount or CSV.
Currently supports:
- Hang Seng Integrated Account (Only Savings transactions are extracted)
- Hang Seng MPOWER Credit Card
- DBS COMPASS VISA Credit Card
Installation
-
Install external dependency
pdftotext
. This is normally packaged underpoppler
for most Linux distros. Windows users may try with this. -
Install package via
pip
:pip install beancount-hangseng
Usage
Beancount
- Add
HangSengSavingsImporter
/MPowerMasterImporter
/DBSImporter
to your import config (See config.py for example) - Run
bean-extract config.py /path/to/eStatement.pdf > output.beancount
CSV
beancount-hangseng-csv -o output.csv -f {hangseng,mpower,dbs} /path/to/statement.pdf
If statements are already downloaded in one folder, you may process and verify output in one go:
cd /path/to/output_dir
beancount-hangseng-csv -t {hangseng,mpower,dbs} -v /path/to/HangSeng_*.pdf -d /tmp/
Run beancount-hangseng-csv -h
for more options and debug suggestions.
Credits
Inspired by @dictcp's Gist.
"Therefore I say unto you, Take no thought for your life, what ye shall eat, or what ye shall drink; nor yet for your body, what ye shall put on. Is not the life more than meat, and the body than raiment?" -- Matthew 6:25
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for beancount_hangseng-0.4.0-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0baa8cd62664667a04cf044341df3cfdfd34908b659251a5323a06f987ed6054 |
|
MD5 | b0450b7e8eeeed250e6ae9745d444993 |
|
BLAKE2b-256 | 0f75745f613e2a24e3d87a4de3d1f64fdd90886edd73f26df799ec05baf62b59 |
Hashes for beancount_hangseng-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a95c848b63ebaed4e2d3f70f4f68d6ecd7ae671cbef4bc83c23d043941d1b3e3 |
|
MD5 | 1b686c5ec16f9d58ad014b043605db32 |
|
BLAKE2b-256 | fcb76ab7c20f30d6171a86309f87fe82ddf9487e47d9411f7b0d29555e0671be |