Expenses is a simple Perl script for tracking finance using Apple’s iCal. The idea is that you start recording your spendings and earnings into iCal and from time to time you can run expenses to check how much you have spent.

1/10/07 – I am rewriting Expenses into Java to keep to code more manageable and portable. It’s essentially complete (read: as incomplete as the Perl version), I’ll just finish the date parser and make a release. You can find the code in the Subversion repository.

1/14/07 – I have found a command-line program called Ledger that is much better than what I wanted Expenses to be. It seems to have poor UTF-8 support, but otherwise it is perfect, which means I am probably not going to work on Expenses any further. (And if I do, it would be just to rewrite it to get a better implementation of what Ledger already does.)


Download the script and put it on your path (plus maybe mark it executable, too? chmod a+x expenses). The script requires several Perl modules that you might not have installed, it will tell you how to install these if the need arises.

iCal event format

You must create a new calendar for the expenses, something called “money” or “finance” is best (case does not matter). The amount should be entered into the “Event title” field and the purpose of the transaction should be entered into the “Location” field. Other fields are currently not processed. If the amount was spent, prefix it with a minus (–). It’s nice to make the event last all day, because then it looks better in iCal.


If your calendar is named “money” or “finance”, expenses will find it automatically. If not, use the --calendar option to specify the calendar name explicitly. Common use cases look like this:

$ expenses
Unable to autodetect calendar, use '--calendar' to choose one.
$ expenses --calendar list
Movies, Work, Music, Balance
$ expenses --calendar Balance this month
Balance: -2,900 (0 in; 2,900 out)
$ expenses --calendar Balance
Balance: -2,900 (0 in; 2,900 out)

That’s about it, see the --help option for built-in documentation (it should be more up-to-date than this website).


The software is currently in alpha stage, which means it does not have to work at all. The time specification is quite primitive (only “day”, “month” and “year” works) and there is almost no error checking. That said, I use the script without trouble. In future I would like to add better time interval parsing (“last two months”, “from 5/6” and such) and detailed reports.


I have not much time to spend on this project, but as I haved released the script to public, I am of course willing to help you if it does not work for you. If I have some spare time, I might also implement the features you request. My e-mail address is zoul@davi.cz.