https://github.com/whtsky/pre-commit-beancount-format
Format beancount files using bean-format
https://github.com/whtsky/pre-commit-beancount-format
beancount pre-commit pre-commit-hook
Last synced: 10 months ago
JSON representation
Format beancount files using bean-format
- Host: GitHub
- URL: https://github.com/whtsky/pre-commit-beancount-format
- Owner: whtsky
- License: gpl-2.0
- Created: 2021-04-27T13:44:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-14T22:44:11.000Z (over 1 year ago)
- Last Synced: 2024-11-01T05:24:08.742Z (over 1 year ago)
- Topics: beancount, pre-commit, pre-commit-hook
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-beancount-format
Format `.beancount` files using [bean-format](https://beancount.github.io/docs/running_beancount_and_generating_reports.html#bean-format)
## Usage
Add this to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/whtsky/pre-commit-beancount-format
rev: "2.3.4" # Use the sha / tag you want to point at
hooks:
- id: beancount-format
```
Or, if you use `.bean` as your beancount files' extensions rather than `.beancount`:
```yaml
- repo: https://github.com/whtsky/pre-commit-beancount-format
rev: "2.3.4" # Use the sha / tag you want to point at
hooks:
- id: beancount-format
files: \.bean$
```
To use custom arguments:
```yaml
- repo: https://github.com/whtsky/pre-commit-beancount-format
rev: "2.3.4" # Use the sha / tag you want to point at
hooks:
- id: beancount-format
args: ["--currency-column=60"]
```