A Python utility to convert OFX/QFX financial files to CSV, TSV, or formatted table output.
- Supports multiple output formats: human-readable tables, CSV, and TSV
- Select specific columns to include in output
- Handles multiple input files in one command
- Shows available transaction fields automatically when invalid columns are specified
- Ensure Python 3.6+ is installed
- Install required dependencies:
pip install ofxparse tabulate
python main.py [OPTIONS] OFX_FILE(S)...
--format FORMAT
: Output format (table
,csv
, ortsv
), default:table
--columns COL1,COL2,...
: Comma-separated list of columns to include
- Basic table view of transactions:
python main.py transactions.ofx
┌──────────┬────────────┬────────────┬───────────┬───────┬────────┬───────────────────────┬───────┬─────────┬─────────────┐
│ amount │ checknum │ date │ id │ mcc │ memo │ payee │ sic │ type │ user_date │
├──────────┼────────────┼────────────┼───────────┼───────┼────────┼───────────────────────┼───────┼─────────┼─────────────┤
│ -58.73 │ │ 2014-09-20 │ 201409206 │ │ │ TRADER JOE'S #541 QPS │ None │ payment │ None │
└──────────┴────────────┴────────────┴───────────┴───────┴────────┴───────────────────────┴───────┴─────────┴─────────────┘
- Basic table view with specific columns:
python main.py transactions.ofx --columns date,amount,payee
┌────────────┬──────────┬───────────────────────┐
│ date │ amount │ payee │
├────────────┼──────────┼───────────────────────┤
│ 2014-09-20 │ -58.73 │ TRADER JOE'S #541 QPS │
└────────────┴──────────┴───────────────────────┘
- Process multiple files with TSV format:
python main.py apostrophe.ofx checking.ofx --format CSV
date,amount,payee
2014-09-20,-58.73,TRADER JOE'S #541 QPS
date,amount,payee
2011-03-31,0.01,DIVIDEND EARNED FOR PERIOD OF 03
2011-04-05,-34.51,"AUTOMATIC WITHDRAWAL, ELECTRIC BILL"
2011-04-07,-25.00,"RETURNED CHECK FEE, CHECK # 319"
Common transaction fields include:
date
amount
payee
memo
id
type
checknum
sic
mcc
To see all available fields for your file:
- Run the script with an invalid column name:
python main.py your_file.qfx --columns invalid_column
- The error message will display all valid columns for your transactions
This project is MIT licensed.