Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cpg314/beancount-ch
Convert monthly statements from Swiss banks into beancount entries
https://github.com/cpg314/beancount-ch
beancount credit-card invoices rust switzerland
Last synced: 1 day ago
JSON representation
Convert monthly statements from Swiss banks into beancount entries
- Host: GitHub
- URL: https://github.com/cpg314/beancount-ch
- Owner: cpg314
- License: apache-2.0
- Created: 2023-07-29T12:22:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-04T18:10:06.000Z (4 months ago)
- Last Synced: 2024-08-04T20:13:37.378Z (4 months ago)
- Topics: beancount, credit-card, invoices, rust, switzerland
- Language: Rust
- Homepage: https://c.pgdm.ch/code
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# beancount-ch
Convert monthly statements from some banks serving the Swiss market into [beancount](https://github.com/beancount/beancount) plain-text entries.
- [Cembra](https://www.cembra.ch/) credit card statements (PDFs)
- [Revolut](https://www.revolut.com/) statements (CSVs)
- [BCV](https://www.bcv.ch/) monthly statements (XLSX spreadsheets)See https://c.pgdm.ch/code/beancount-ch
Note that beancount itself has importation tools: see [this documentation page](https://beancount.github.io/docs/importing_external_data.html) and [beangulp](https://github.com/beancount/beangulp).
## Usage
```console
beancount-ch
Parses a monthly statement and output it as Beancount entriesUSAGE:
beancount-ch [OPTIONS]OPTIONS:
--accounts-rules-csv
CSV with {text contained in merchant name}, {account} for expense account guessing-h, --help
Print help informationSUBCOMMANDS:
bcv Monthly statements from BCV (XLSX format)
cembra Monthly credit card statements from Cembra (PDF format)
help Print this message or the help of the given subcommand(s)
revolut Revolut statements (CSV format)
```A command of the form
```console
$ cembra-beancount --accounts-rules-csv rules.csv cembra 2022-05.pdf
```then produces beancount entries of the form
```beancount
2022-05-01 * "Bakery Inc."
Expenses:Food 15.80 CHF
Liabilities:CreditCard
...
```### Account guessing
In many cases, the expense account (here `Expenses:Food`) can be guessed from the merchant name. The `--accounts-rules-csv` file contains simple rules of the form
```text
{text contained in merchant name}, {account}
...
```applied sequentially until a match is found.