BEAN-FORMAT(1)

πŸ“¦
version 2.3.6 Β· 3 versions
, in ubuntu noble

πŸ’… bean-format β€” pretty print & align a Beancount ledger ✨

okay bestie, listen up, this is bean-format from the User Commands girlies, and she's here to make your ledger look aesthetic. πŸŽ€


🌸 NAME 🌸

bean-format β€” pretty print and align a Beancount ledger πŸ¦‹


✨ DESCRIPTION ✨

so the vibe is this, here's the usage fr fr:

usage: bean-format [-h] [--version] [-o OUTPUT] [-w PREFIX_WIDTH]
       [-W NUM_WIDTH] [-c CURRENCY_COLUMN] [filename]

okay so what does she actually DO? she aligns the numbers in a beancount/ledger input file. she reformats a beancount or ledger input file so that the amounts in the postings are all lined up in the same column. slay. the currency should match too β€” no mixing, that's the rule. πŸ‘‘

πŸ’€ not me β€” but real talk: this does NOT parse the Beancount ledger. like, at all. she's just out here using regular expressions and text manipulations to do her work. no parser, no AST, just regex and vibes. iykyk.

🧚 positional arguments 🧚

  • filename β€” the Beancount filename, bestie. that's the file she's gonna glow up. ✨

πŸŽ€ options πŸŽ€

  • -h, --help β€” show this help message and exit. the classic "what do i do here" button, we love her. 🫢
  • --version, -V β€” show program's version number and exit. she'll tell you who she is and then dip. πŸ‘‘
  • -o OUTPUT, --output OUTPUT β€” output file. if you don't specify one she just sends it straight to stdout, main character energy. πŸ’…
  • -w PREFIX_WIDTH, --prefix-width PREFIX_WIDTH β€” use this prefix width instead of letting her figure out the optimal value automatically. sometimes you just gotta take the wheel. πŸ”₯
  • -W NUM_WIDTH, --num-width NUM_WIDTH β€” use this width to render numbers instead of determining an optimal value. same deal, but for the digits. ⭐
  • -c CURRENCY_COLUMN, --currency-column CURRENCY_COLUMN β€” align currencies in this column. so all your currencies line up like a little synchronized swimming routine. 🌈

that's the whole page, no notes, every flag accounted for, we did not skip a single one because that would be a crime honestly. πŸ’œ


and that's a wrap!! this little icon is bean-format 2.3.6, dated April 2024, and yeah she's a BEAN-FORMAT(1) girl through and through. go align some numbers bestie, you got this πŸ’–βœ¨

πŸ“¦ where this page comes from