Update project structure and move to beancount

This commit is contained in:
2025-03-02 11:08:33 -05:00
parent 886bcdbdd1
commit 08c50e776e
17 changed files with 1844 additions and 296 deletions

View File

@@ -1,17 +1,25 @@
# ledgerai
Script to transform CSV data into [ledger](https://ledger-cli.org/) accounting
files.
Script to transform CSV files into [beancount](https://beancount.github.io/docs/beancount_language_syntax.html) accounting files.
# Usage
## Usage
Run `pipenv install -dev` to install all packages.
To transform CSV data into Beancount run `toldg` via `python-poetry`.
Run `pipenv shell` to get venv shell.
```bash
poetry -P ${LEDGER_DATA_ROOT} run toldg
```
Run `pipenv install <package>` to install a package.
To visualize the data with [fava](https://beancount.github.io/fava/) install all
dependencies via `python-poetry`, enable the venv and run `fava` from there.
# Architecture
```bash
poetry install
eval "$(poetry env activate)"
fava your_ledger.beancount
```
## Architecture
The script takes a directory in which it recursively searches for CSV and LDG
files. From these files, it generates a single ledger accounting file that
@@ -26,4 +34,3 @@ transactions can also get a more meaningful description and tags.
The mapping information are stored in a file `mappings.json`. It maps a unique
identifier for each transaction (based on the filename and full CSV row) to a
respective *account2*.