I've not messed with it myself, but take a look at beancount's `beancount/scripts/format.py`, The `main` function from this is what's called in bean-format. It looks like it just reads the specified file, formats it with the function `align_beancount` (also in format.py), then writes what that returns. You could apply that function to your importer's output text before writing it.
On Friday, February 28, 2025 at 9:38:20 AM UTC-6 Oon-Ee Ng wrote: > Having updated my personal importers to beangulp's import.py - I'm left > with something which has been on my todo list for a while - how do I > automatically align numbers in beangulp output? > > Trying to achieve the equivalent of :- > python import.py extract /path/to/beancount/file | bean-format -c 100 > > without having to run bean-format. > -- 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 visit https://groups.google.com/d/msgid/beancount/ed976b34-c060-4670-9ea1-13f81b236019n%40googlegroups.com.