Metadata-Version: 2.4
Name: beancount-format
Version: 0.2.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
License-File: LICENSE
Summary: Beancount formatter powered by dprint-plugin-beancount
Home-Page: https://github.com/trim21/beancount-format
Author-email: trim21 <trim21.me@gmail.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# beancount-format

beancount formatter.

## Install

```bash
pip install beancount-format
```

## Usage

### as CLI

```bash
beancount-format ./
```

### as library

```python
from bean_format import format_text

source = "2010-01-01 open Assets:Cash\n"
formatted = format_text(source)
print(formatted)

# Override formatter options
formatted = format_text(
    source,
    path="ledger.beancount",  # defaults to "<memory>"
    line_width=88,
    indent_width=2,
    new_line="lf",  # "lf" or "crlf"
    compact_balance_spacing=True,
)
print(formatted)
```

