Hi guys,

I've put together a little reporting system for Ledger that I think
others might find useful. Basically, it watches your ledger file for
changes and loads it into a PostgreSQL database table. Reports are
HTML files with embedded ruby templates that contain SQL queries.

Here's the code: https://github.com/peterkeen/ledger-web
Here's my configuration, showing some non-trivial reports and
customizations: https://github.com/peterkeen/ledger-web-config

To answer the obvious question, I feel that the SQL+HTML combo allows
quite a bit more flexibility than raw ledger with respect to the kinds
of reports I can write and how they can be presented. Things that
would require multiple calls to ledger and a bunch of shell scripting
become a straightforward SQL query, especially with PostgreSQL 9's
"with" expression and window queries.

I hope you guys find this useful. I'm planning on writing up a blog
post about it tomorrow which I'll share here as well.

--Pete

Reply via email to