ledger2beancount(1)

πŸ“¦
version 2.7 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

ledger2beancount β€” it's the glow-up machine that turns a ledger into a beancount. ledger to beancount converter, no cap. ✨

This is the manual for ledger2beancount(1), bestie. Come thru. πŸ¦‹


🌸 SYNOPSIS 🌸

ledger2beancount [options] input.ledger > output.beancount
cat input.ledger | ledger2beancount [options] > output.beancount

Two ways to serve the same lewk β€” file in, or piped in. Either way it goes to stdout. πŸ’…


✨ DESCRIPTION ✨

ledger2beancount is a script that automatically converts ledger(1)-based textual ledgers into beancount files. Like, it literally just does it for you. πŸ”₯

The conversion is based on (concrete) syntax, okay? Which is the whole point, because it means info that's not meaningful for accounting reasons but is still super valuable to you β€” think comments, formatting, the little aesthetic details β€” can be preserved. It's giving "nothing gets lost in the transition." 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -c, --config β€” point it at a configuration file of your choosing. The options you can put in that config file are described over in ledger2beancount(5) and in the ledger2beancount manual. iykyk. πŸ“„
  • -h, --help β€” shows you the help message and then dips. bye bestie πŸ‘‹
  • -V, --version β€” shows you the version and then dips. iconic, honestly πŸ’…

🌈 USAGE 🌈

ledger2beancount accepts input from stdin or from a file, and it writes the converted data to stdout. Main character energy: it reads, it transforms, it outputs, it does not elaborate. ✨

You can run ledger2beancount like this on the example provided:

ledger2beancount examples/simple.ledger > simple.beancount
Important, fr fr: after you convert your ledger(1) file, you should validate the generated beancount file with bean-check(1) and fix all the errors:
bean-check simple.beancount

You should also actually look at the generated beancount file to see if it looks correct to you β€” vibe check your own output, bestie. πŸ‘€

Please note that ledger2beancount puts notes at the beginning of the generated beancount file if it encounters problems with the conversion. So read the top of the file, not just the middle. 🫑

πŸ—‚οΈ FILES πŸ—‚οΈ

  • $PWD/.ledger2beancount.yaml or $PWD/ledger2beancount.yaml β€” the configuration file for the current directory. Right here, right now, in your $PWD. πŸ“
  • $XDG_CONFIG_HOME/ledger2beancount/config.yaml (usually $HOME/.config/ledger2beancount/config.yaml) β€” the default configuration file. Your everyday go-to, the reliable one, the comfort config. πŸ’œ

πŸ’€ BUGS πŸ’€

If you find any bugs in ledger2beancount or you believe the conversion from ledger to beancount could be improved, please open an issue on GitHub, okay? Not in the group chat β€” on GitHub:

https://github.com/beancount/ledger2beancount/issues

And please include a small test case so we can reproduce the problem. Like, a tiny one. Small. Minimal. That's the whole ask. πŸ™


πŸ‘‘ AUTHORS πŸ‘‘

Stefano Zacchiroli and Martin Michlmayr β€” absolute legends, the originators, the blueprint. 🌟


πŸ¦‹ SEE ALSO πŸ¦‹

The full documentation for ledger2beancount can be found in its manual. Yes, the whole thing. Go read it, it's worth it. πŸ“š


okay that's the whole page, bestie, you ate it πŸ’–βœ¨

This page was last updated 2022-12-18, and it's page ledger2beancount(1) of the manual, straight from the source β€” General Commands Manual. love that for us πŸŽ€πŸŒΈπŸ«Ά

πŸ“¦ where this page comes from