Plain Text Accounting Formats

Comparison of plain text accounting formats with tree-sitter parsing and syntax highlighting.

Formats Covered

Documentation

Full format documentation with grammar definitions and examples: docs/internal

Install

go install codeberg.org/hum3/plain-text-accounting-formats/cmd/ptaf@latest

CLI Usage

gts-beancount parse ledger.beancount
gts-beancount highlight ledger.beancount
gts-beancount check ledger.beancount

Library Usage

import ptaf "codeberg.org/hum3/plain-text-accounting-formats"

tree, err := beancount.Parse(src)
ranges, err := beancount.Highlight(src)
golucaSrc, err := beancount.Convert(src)

Build & Test

task check       # fmt + vet + test
task docs:build  # generate HTML docs

How documentation fits together

Go library and CLI for parsing and syntax-highlighting plain-text accounting formats (beancount, goluca, PTA) using gotreesitter.

So this is linked to other sites:

Documentation https://h3-pta-formats.statichost.page/
Source (Codeberg) https://codeberg.org/hum3/plain-text-accounting-formats
Mirror (GitHub) https://github.com/drummonds/plain-text-accounting-formats