Last updated on Jan 06, 2021
I use the JCF tool to convert my bank’s transactions CSV files to
ledger compatible files.
Never head of JCF? See the setup.
JCF is a tool I wrote that can read CSV files exported by bank and credit card company websites, provide text-based prompts to help you match the transactions to other accounts, and then export
ledger files that can be merged in to a master ledger. Invoking and using the tool is very easy with some quick extra setup:
- Adding a settings profile for the institution’s CSV format.
- Ensuring your
master.accountsfile has all the accounts you intend to use for matching.
After that, I convert a CSV file to a ledger file like this:
cd ~/Development/ledger-scripts # Make sure you have your JCF workspace set in vars.sh! bash match.sh ally,1234 ~/Downloads/input.csv ~/Downloads/output.ledger
After running the command, JCF will import all your existing account and transactions then present you with a series of match prompts like the following:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │4 left to match (including this one). │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │Jan 29, 2020 - Torchy's Tacos │ │ -$18.25 Liabilities:Credit Card:Chase │ │ │ │(1) Expenses:Food/Drink:Restaurants │ │(2) Expenses:Food/Drink:Alcohol & Bars │ │(3) Leave unmatched. │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Enter an option number (1 of 3), type a character and hit tab to autocomplete from 52 options, or hit enter to accept the default (1):
The options are calculated for every transaction and are based off the existing transaction examples in your master ledger and improve over time as you get more examples. If you’re just starting out you may have to use the
Assuming you didn’t escape via
Jan 06, 2021 9:03:40 PM net.brentwalther.jcf.CsvMatcher run INFO: Wrote file: yes - /home/brentwalther/Downloads/transactions.ledger
Next, get on to merging it.