This repository contains a template for using hledger-flow with custom scripts tailored for various banks along with sample data. It demonstrates how to preprocess, import, and maintain financial data using automated workflows driven by hledger-flow and the hledger ledger tool.
- Custom scripts per bank for transaction extraction and data preprocessing
- Sample banking data demonstrating real-world transaction flow
- Automated import and ledger file generation via hledger-flow
- Generation of standard financial reports including Balance Sheet and Income Statement
- hledger (latest version)
- hledger-flow (latest version)
- mise task runner to run tasks such as import and balance
-
Clone this repository:
git clone https://github.com/bevsxyz/FinancialFlowScripts.git cd FinancialFlowScripts -
Install required tools as per your platform's instructions:
- mise (it will handle the rest)
- hledger
- hledger-flow
-
Review and adjust bank-specific script files in the
import/directory if needed.
Remove generated intermediate files to start fresh:
mise run cleanRun the full import pipeline including all preprocessing and journal generation steps:
mise run importGenerate the balance sheet report from all journal data:
mise run balanceSample balance sheet output (as of 2024-04-06):
<style> table {border-collapse:collapse} th, td {padding-left:1em} th.account, td.account {padding-left:0;} td:nth-child(1) {white-space:nowrap} tr:nth-child(odd) td {background-color:#eee} </style><style> table {border-collapse:collapse} th, td {padding-left:1em} th.account, td.account {padding-left:0;} </style>| 2024-04-06 | |
|---|---|
| Assets | |
| Assets:Current:Bevan:HDFC:Cheque | ₹2441.46 |
| Total: | ₹2441.46 |
| Liabilities | |
| Total: | 0 |
| Net: | ₹2441.46 |
import/— Contains raw bank data and preprocessing scriptsall-years.journal— Generated ledger file with all imported datamise.tool— Definesclean,import, andbalancetasks for convenience
Contributions to improve scripts for additional banks or sample data are welcome. Please submit pull requests or raise issues for suggestions and bugs.
This project is licensed under the MIT License.