[Cialug] Finance Software

Ken MacLeod ken at bitsko.slc.ut.us
Fri Sep 19 10:18:52 CDT 2008


On Fri, Sep 19, 2008 at 8:36 AM, Todd Walton <tdwalton at gmail.com> wrote:
> Is there software to help me do this?  I tried Gnucash last year.  I
> got from January 1 all the way to October or so and kind of sputtered
> out.  I don't really need to track every financial transaction *after*
> the fact.  I want to know what's upcoming, and what my finances will
> be a week or two out  What do you do?

I use a two column (amount, purpose) plain text file and the perl
script below.  The script outputs three columns (amount, balance,
purpose), skipping lines that start with '#'.  I edit in one window
and run 'watch' on the script in another window to update every time I
save the file.  I use perl instead of a spreadsheet because I modify
the script sometimes for special cases and I'd rather not learn the
spreadsheet's macro language ;-).  I budget out a couple of months and
I move older history to another file after checking balances.

-------- cut here --------
#!/usr/bin/perl -w

# watch perl budg.pl

use strict;
use warnings;

my $printing = 0;
my $balance = 0;

open(BUDG, "budget")
  or die "budget: $!\n";
while (<BUDG>) {
  $balance = 0 if /\s*#--- monthly budget/i;
  $printing = 1 if /\s*#--- cut/i;
  print if /^\s*$|^\s*#/;
  next if /^\s*#|^\s*$/;
  s/^\s*//g;
  my ($amount, $purpose) = split(/\s+/, $_, 2);
  $balance += $amount;
  printf "%8.2f %8.2f %s", $amount, $balance, $purpose
    if $printing;
}
close(BUDG);
-------- cur here --------


More information about the Cialug mailing list