XML: +1 vote What ever you decide, please don't remove the command emacs that output S-EXP.
Best, Alexandre Rademaker http://arademaker.github.com/ On Thu, May 17, 2012 at 2:05 PM, Russell Adams <[email protected]> wrote: > On Thu, May 17, 2012 at 09:19:09AM -0700, Zack Williams wrote: >> In light of recent discussions, I've been thinking about ways to >> generate more complex documents or reports with ledger. >> >> In most languages, this is done by creating a templating or document >> embedding method, where data is injected next to arbitrary content, >> ranging from a simple "mail merge" to more complex behaviors. > > For sharing's sake, I've attached the perl script I use to create > expense reports from Ledger data in Latex. It creates several tables > of summaries, using a Ledger custom output format to give me data I > can quickly parse. > > It would take me time I can't spare at the moment to create a sample > dataset and example report. > >> There seem to be 3 different ways that could be pursued for this: >> >> - Come up with a ledger specific templating engine, building on >> existing work. > > Violates KISS. I couldn't see a simple template performing more > complex reporting and summaries. > >> - Use the new python functionality to implement similar functionality >> with one of python's templating engines (mako, evoque, etc.) > > This is a good idea. Using a python program that can interface to > Ledger to get data, and then perform custom business logic and pass it > on to a template engine would rock. That said, my perl script isn't > that different, except I'm calling Ledger via exec and pulling the > STDOUT in and parsing it from a custom output format (~ delimited). > >> - Change XML output from it's current form (which is similar to bal >> and reg and is pretty flat) to be more of an output filter that wraps >> arbitrary queries and other output, then use XSLT or other XML tools >> to fill templates. > > You said XML. -1 > > Great discussion points though. >
