This is useful when passing a concatenation of multiple Beancount files as an input to bean-add (as suggested in https://github.com/simon-v/bean-add/issues/3#issuecomment-250917599). However, in order for the statements to be sorted by date (a prerequisite for bean-add to work correctly), it's better to use "bean-report print main.bnct > merged.bnct" rather than "cat *.bnct > merged.bnct".
The output of bean-report has some features that bean-add couldn't handle:
bean-report uses comma separators when printing large numbers (e.g., 12,344.50 CHF). bean-add would fail to parse such numbers.
For every pad statement, bean-report inserts a padding transaction flagged with 'P', e.g.:
2019-03-09 P "(Padding inserted for Balance of 124.10 CHF for difference 15.20 CHF)"
bean-add would crash on encountering such transactions.
This is useful when passing a concatenation of multiple Beancount files as an input to bean-add (as suggested in https://github.com/simon-v/bean-add/issues/3#issuecomment-250917599). However, in order for the statements to be sorted by date (a prerequisite for bean-add to work correctly), it's better to use "bean-report print main.bnct > merged.bnct" rather than "cat *.bnct > merged.bnct".
The output of bean-report has some features that bean-add couldn't handle:
2019-03-09 P "(Padding inserted for Balance of 124.10 CHF for difference 15.20 CHF)"
bean-add would crash on encountering such transactions.This PR resolves the above 2 problems.