FWIW ... I make extensive use of preprocessing when entering bulk items 
that are not available in a manner suitable for importers. Frequently I 
write a set of M4 macros that let me generate beancount directives from the 
information in a very very compact fashion. it is a little old-school but 
it works. :-) My makefile builds the beancount files and it all gets source 
controlled just in case I want to look at things in a context where I don't 
have M4 (I have no idea where that would be ... )



Alan

On Saturday, 7 March 2026 at 22:19:18 UTC [email protected] wrote:

> I won't be able to accept large PRs on Beancount at this time.
> I would recommend you do a fork and use and maintain that for a while 
> until the bugs are ironed out.
> This would require recreating the parser and seeing as I'd like to rewrite 
> all the core in another language I'm not sure it'll be productive to do 
> that on the Python/C version it currently is.
>
>
>
> On Sat, Mar 7, 2026 at 5:04 PM Tim Sweña <[email protected]> wrote:
>
>> True. This proposal can't do a round trip. I'll ponder what it'd take to 
>> introduce a proper AST.
>>
>> On Sat, Mar 7, 2026 at 3:55 PM Martin Blais <[email protected]> wrote:
>>
>>> This other type of plugin should operate on the AST, with round trip 
>>> capability.
>>> Beancount doesn't _really_ have a proper AST.
>>> Text transformations such as what you propose should be done as 
>>> preprocessing, not in Beancount.
>>>
>>>
>>>
>>> On Sat, Mar 7, 2026 at 2:56 PM Tim Sweña <[email protected]> wrote:
>>>
>>>> Hello folks,
>>>>
>>>> I am just getting started with Beancount and was excited about:
>>>>
>>>> > Any line that does not begin as a valid Beancount syntax directive 
>>>> (e.g. with a date) is silently ignored.
>>>>
>>>> from the language syntax guide, but that turned out to be out-dated (
>>>> https://github.com/beancount/beancount/issues/388). I got kinda 
>>>> attached to the idea of a "literate programming" ledger, so I thought of a 
>>>> proposal that I think could fit well into the current plugin architecture:
>>>>
>>>> I/O plugins. These intercept and transform the raw file input/output 
>>>> (I/O) stream before Beancount's standard parser sees the content.
>>>>
>>>> For easier commenting, I wrote the up in more detail at:
>>>>
>>>> https://docs.google.com/document/d/16conmm3cKC4raXnFW1UiiSmMGIhs0qO2oLK2siHUBOI/edit?usp=sharing
>>>>  
>>>> I've also started prototyping these ideas at 
>>>> https://github.com/tswast/beancount/pull/1.
>>>>
>>>> I'd love to hear your thoughts.
>>>>
>>>> --Tim
>>>>
>>>> -- 
>>>> 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 [email protected].
>>>> To view this discussion visit 
>>>> https://groups.google.com/d/msgid/beancount/CACv%3DJ46E05uk5a1rdCZyCbrMosFUpgwRCpvEBULHnvFYrHa69Q%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/beancount/CACv%3DJ46E05uk5a1rdCZyCbrMosFUpgwRCpvEBULHnvFYrHa69Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>> 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 [email protected].
>>> To view this discussion visit 
>>> https://groups.google.com/d/msgid/beancount/CAK21%2BhM8WZKrVTCdwA%3Dme3zbsYo1SAk_xiBOMxT%2Bbh%2BX602y%3DQ%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhM8WZKrVTCdwA%3Dme3zbsYo1SAk_xiBOMxT%2Bbh%2BX602y%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> 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 [email protected].
>>
> To view this discussion visit 
>> https://groups.google.com/d/msgid/beancount/CACv%3DJ47xWhCgbrgnH6RczQ7%3D5jkgBLdmC8jkuAr7Pok-XtVmBg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/beancount/CACv%3DJ47xWhCgbrgnH6RczQ7%3D5jkgBLdmC8jkuAr7Pok-XtVmBg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/e16d9310-5729-4850-9c1c-0b69cdcb953bn%40googlegroups.com.

Reply via email to