ledger2beancount1
Ledger to beancount converter
Usage
ledger2beancount [options]
input.ledger
>
output.beancount
cat {input.ledger | ledger2beancount
[options]
>
output.beancount}
Overview
ledger2beancount is a script to automatically convert ledger(1)-based textual ledgers to beancount files.
Conversion is based on (concrete) syntax, so that information that is not meaningful for accounting reasons but still valuable (e.g., comments, formatting, etc.) can be preserved.
Options
-
-c, --config -
Specify a configuration file. The options of the configuration file are described in ledger2beancount(5) and the
ledger2beancountmanual.
-
-h, --help -
Show help message and quit.
-
-V, --version -
Show version and quit.
Usage
ledger2beancount accepts input from stdin or from a file and will write the converted data to stdout. You can run ledger2beancount like this on the example provided:
ledger2beancount examples/simple.ledger > simple.beancount
After you convert your ledger(1) file, you should validate the generated beancount file with bean-check(1) and fix all errors:
bean-check simple.beancount
You should also inspect the generated beancount file to see if it looks correct to you. Please note that ledger2beancount puts notes at the beginning of the generated beancount file if it encounters problems with the conversion.
Files
$PWD/.ledger2beancount.yaml or $PWD/ledger2beancount.yaml
The configuration file for the current directory.
$XDG_CONFIG_HOME/ledger2beancount/config.yaml (usually $HOME/.config/ledger2beancount/config.yaml)
The default configuration file.
Releases
3 releases since Debian 11 (Bullseye); the text changed 1 time.