ledger

My ledger notes & projects.

John Wiegley's ledger is a sort of command-line gnucash/quicken. It's a very useful tool for tracking finances in a scalable, robust, scriptable way. Here is his git repo. Here is a browsable copy of the manual: one page, many pages, pdf.

Below are some related tools I've written or worked on.

hledger

A ledger clone in haskell! See http://hledger.org .

squeakledger

A simple ledger file parser in squeak.

sm-Ledger.st

ledgertools

Some old tools and hacks useful with ledger (or clones). Most of these require ledger 2.5 as current ledger has some open issues.

darcs get http://joyful.com/repos/ledgertools (changes)

ledgerutils.el provides magic ledger- and timelog-updating keys, auto-updating summary of hours this day and this week, etc.

ledgerplot.py plots some preliminary but still useful charts from your ledger file, in a number of output formats. It requires [plotting|python-pychart]? as well as ledger. ledgerplot.ss explores doing the same with plt scheme/pltplot.

ledgerplot-shot1.png

ledgerstat reports some useful ledger statistics using beancount:

$ ledgerstat
Ledger status report as of 2008-05-26
-------------------------------------
File: /Users/simon/current.ledger
Nb accounts: 104
Nb transactions: 357
Nb commodities: 2
Nb postings: 830
Nb unique payees: 1
Transactions: 357 over 145 days (2.5 per day)
Transactions for the past 30 days: 78 (2.6 per day)
The last reconciliation seems to have been: 21 days ago (on 2008-05-05)
The last non-future transaction was: 1 day ago

report is a ledger front end with easier period and depth control for generating reports. If invoked via "timereport" or "hours" symlink it reports on your timelog instead. Obsolete, use hledger with "hours" symlink instead. Examples:

hours                     -> show the entire timelog's balance
hours day                 -> today's balance ("hours today" also works)
hours week                -> since monday
hours month               -> since the first of the month
hours 2008 --depth 1      -> in 2008, top level accounts only
hours 2008/5              -> in may
hours 2008/5/2            -> on the 2nd
hours 2008/1/15 2008/1/31 -> jan 15th to jan 31st inclusive
hours year -- -s bal work -> work hours this year
hours week -- -w register -> clock-ins this week, wide format
hours -- -A register      -> average clock-in length

recurring helps generate recurring entries.:

With no arguments, prints any recurring ledger entries due today, ready
for adding to a ledger file. The idea is to call this once a day to add
predictable transactions to your ledger, keeping it more current and
reducing effort at reconcile time.

With a day number or all, print entries for that day, or all entries.
With a month number, print entries dated for that month. These are
useful for manual catch-up.

Here is an example crontab line: "0 0 * * * user recurring >>LEDGERFILE".
On a mac, add "recurring >>LEDGERFILE" to /etc/daily.local instead.
(laptop users: this will get called just once on waking from a multi-day
sleep and not at all for powered-off days, so you might need to catch up.)

Recurring entries are configured below, grouped by day of the month.
Each is a list of arguments to the ledger entry command. It uses the
most recent similar entry as a template, so usually the payee is enough,
but you might also want to set the amount.  I use .99 as a memo for
"approximate, adjust me later".

wellsfargocsv2ledger.py converts wells fargo CSV account data to ledger format

beancount

beancount is Martin Blais' ledger clone in python, to which I've contributed some parsing improvements. NB includes another haskell ledger parser.

hg clone https://hg.furius.ca/public/beancount