I use KMyMoney. It's not plain text - it's a GUI. It saves everything in a compressed XML.
I pointed an LLM at the source code, and told it to document the XML schema.
Using that document, I can now have the LLM code scripts for automated data entry. It's fantastic. You could easily use it to output everything in ledger format.