John Wiegley’s ledger

From John Wiegley, Emacs ubercoder:

I’ve traded 60 Mb on my laptop for 60 Kb. How can you, too, lose
three orders of magnitude of fat and waste on your hard drive?

By checking out the incredibly lean and mean “ledger” accounting
tool. Written in C++, it parses it only, simplified general ledger
file (intended for editing with Emacs), or it can even just parse
GnuCash data files directly. This gives you the easiest way of
starting out:

ledger -f print

That will print out your GnuCash XML ledger data into much simpler,
text-based “ledger” file.

Below is the code. For reading GnuCash, you’ll need libxmltok1-dev
installed (if you’re a Debian user). It also uses GNU’s
multi-precision library (libgmp3-dev) and Perl regular expression
library (libpcre3-dev).

http://sacha.free.net.ph/notebook/emacs/ledger.tar.bz2

  • http://www.red-bean.com/kfogel Karl Fogel

    Seconded, wholeheartedly. John Wiegley’s Ledger has become irreplaceable infrastructure for me — when hackers do bookkeeping, this is how it should be done.

    • http://sachachua.com Sacha Chua

      I’m not entirely sure how I’m going to get it into a form that my accountant will be able to easily work with, but I love planning my spending with the virtual envelope system I also use for my personal finances, so we’ll see how this goes!