gobean

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 1 Imported by: 0

README

gobean

Basic beancount clone (one day...) written in Go.

I'm deliberately writing this without looking at either the beancount source code or general AST parsing guidelines.

Planned features:

  • Parse beancount files
  • Calculate account balances
  • Use Decimal
  • Propagate line numbers for debugging
  • Price directives
  • Pad directives
  • Validate transactions against open/close directives
  • Validate balance directives
  • Open/close with multiple curencies

Usage

Install
go install github.com/carderne/gobean@latest
Run
$ gobean

NAME:
   gobean - A new cli application

USAGE:
   gobean [global options] command [command options]

COMMANDS:
   api, a       Run the API for a beancount file
   balances, v  Print all account balances
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

Development

Install dependencies
git clone git@github.com:carderne/gobean.git
cd gobean
go get .
Build

Requires at least Go v1.21.

# automatically fmts and vets
make
Lint
make lint
Test
make test

Docker

docker build --tag carderne/gobean .
docker run -p 6767:6767 --rm -v ./example.bean:/file.bean carderne/gobean

Documentation

Overview

Package main is just an entrypoint Check package bean for full details!

Directories

Path Synopsis
Package api is a very basic HTTP API to gobean
Package api is a very basic HTTP API to gobean
Package bean contains all beancount logic Including parsing, validating, calculating etc
Package bean contains all beancount logic Including parsing, validating, calculating etc
Package cmd is the CLI entrypoint
Package cmd is the CLI entrypoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL