JCF Documentation


Last updated on Jan 06, 2021

The output of matching is a simple ledger-CLI compatible text file. It’s perfectly fine to open and edit the file using your favorite text editor. Depending on whether every transaction is properly balanced, you may end up needing to.

To merge a ledger-cli compatible listing of transactions (e.g. transactions.ledger below) in to your master.ledger, use the ledger-scripts/merge.sh as follows:

cd ~/Development/ledger-scripts
bash merge.sh ~/Downloads/transactions.ledger

If there are any problems with the merge, ledger will print them and the merge will fail. For example:

While balancing transaction from "/tmp/tmp.6lhsdICjqC", lines 24148-24149
> 2020-01-30 * NORDSTROM #0010 LYNNWOOD WA
>   Liabilities:Credit Card:Chase 1234                        $-80.97
Unbalanced remainder is:
Amount to balance against:
Error: Transaction does not balance

A few common reasons you’d have to make manual fixes:

If no errors were printed, you can assume the merge was successful. Next, I diff and make a commit.