This is...therapeutic :). I'd long given up on having a neat, consistent ledger sources, given that I automate importing and mostly consume my ledger via Beancount (scripts, bql, Fava, etc.). But I do occasionally have to open up my ledger, and am never satisfied with the ugliness scattered over. autobean-format is a magic wand to banish all of that!
For anyone who wants to cross check the basic autobean-format formatting, use "git diff --ignore-space-change --ignore-blank-lines". If you don't store your ledger under version control, now's a good time to do it. Thanks a bunch! And I appreciated the --recursive. On Friday, March 31, 2023 at 3:25:08 PM UTC-7 seia...@gmail.com wrote: > Hi beancounters, > > I've written yet another formatter for beancount, autobean-format > <https://github.com/SEIAROTg/autobean-format>, powered by my earlier > project autobean-refactor <https://github.com/SEIAROTg/autobean-refactor>, > a library for parsing and programmatically manipulating beancount files. > > Highlights: > > - Deep cleanup > - Unlike bean-format which is regex-based, autobean-format is based > on a proper parser, allowing it to format every corner of your ledger, > including *arithmetic expressions*. > - Recursive formatting > - Optionally formats all included files. > - Honors glob include. > - Sort entries > - Optionally sorts dated entries. > - Honors "time" meta (HH:MM, HH:MM:SS, epoch seconds, epoch ms, > epoch us). > - Honors pushtag / pushmeta. > - Preserves existing comments, structure, and ordering whenever > possible. > - Preview-able > - Optionally prints diff. > - Thousands separators. > - Optionally add, remove, or keep (default) thousands separators. > - Typed and extensible > - For example, the code for supporting thousands separator is as > simple as this > > <https://github.com/SEIAROTg/autobean-format/blob/main/autobean_format/formatters/number.py> > . > > Please check out autobean-format > <https://github.com/SEIAROTg/autobean-format> if you are interested. Bug > reports / suggestions / contributions are appreciated. > > Regards, > SEIAROTg > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/9b4b6361-2e4e-460a-92b4-146c03ec6509n%40googlegroups.com.