Import
We can import transactions in CSV format, and product ledger transactions. Transactions are classified using best-likely match based on payee descriptions. Matches do not need to be exact matches, it's based on probability determined by learning from existing transactions. The more existing transactions in your ledger file, the better the matches will be.
Example
Example transactions from your credit card csv download.
Transaction Date,Description,Amount
01/12/22,Dominoes Pizza HOUSTON TX,12.34
01/23/22,Dominoes Pizza PEARLAND TX,14.34
01/02/22,Half Price Books AUSTIN TX,5.24
Let's run our import, making sure to specify the correct date-format to match the CSV file.
Run ledger -f ledger.dat --date-format "01/02/06" import MasterCard transactions.csv
2022/01/12 Dominoes Pizza HOUSTON TX
Expenses:Food:TakeOut 12.34
Liabilities:MasterCard -12.34
2022/01/23 Dominoes Pizza PEARLAND TX
Expenses:Food:TakeOut 14.34
Liabilities:MasterCard -14.34
2022/01/02 Half Price Books AUSTIN TX
Expenses:Books 5.24
Liabilities:MasterCard -5.24
These are not written to our ledger file, just displayed. Once we are satisfied
with the transactions we can write them to our ledger file by
running ledger -f ledger.dat --date-format "01/02/06" import MasterCard transactions.csv >> ledger.dat