Skip to content

jmgilman/beancount-example

Repository files navigation

beancount-example

A small container which generates example beancount ledger files and makes them available over HTTP. Primarily used in test environments which test against beancount data.

Usage

Run the container:

docker run -p 8001:8001 jmgilman/beancount-example # or ghcr.io/jmgilman/beancount-example

The generated beancount data can be accessed at the root path:

curl http://localhost:8001/

By default, the example data is only generated once and then reused across requests. This is helpful in test scenarios where you need the backing data to remain unchanged.

To override this behavior and force the data to be regenerated, simply provide the following query parameter with the request:

curl http://localhost:8001/?reset

This can be called any number of times with the backing data being regenerated each time the query parameter is appended.

Configuration

The following optional environment variables can be set for controlling generation:

Name Default Description
START None The date at which to begin generating random entries
END None The date at which to stop generating random entries
BIRTH None The fictional birth of the ledger owner (controls account opening)

Note that unset values are randomly generated.

About

A small container for generating example Beancount data

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors