Extract numbers from the "Description" field?

Josh Sled jsled at asynchronous.org
Sun Jan 27 09:51:49 EST 2008


David Lee Lambert <lamber45 at msu.edu> writes:
> I've been using GNUcash to track all my personal finances for about a
> year.  Whenever I purchase fuel for my car,  I make a debit to
> "Expenses:Transp.:Gas" with a note like this in the "Description" field:
>
>   Gas - 8.472 gal. - 181.6 mi.
>
> I'd like to export that into a spreadsheet so I can run reports and draw
> graphs of things like fuel efficiency and fuel cost per mile.  Any
> suggestions on where to start?

<http://wiki.gnucash.org/wiki/FAQ#Q:_How_can_I_export_data.3F> has some ideas
about exporting data.

If you're handy with XSLT or other ways to process XML, the data file
shouldn't be too off-putting.

One could probably use {grep, awk, sed} to get the data out in this scenario,
if the format you've used is regular enough.

There are a couple of ways to get at the GnuCash core (file loading, "engine"
data structures) via other languages.  You could use those to load your
datafile, iterate over the transactions and extract the information.

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo ${a}@${b}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-user/attachments/20080127/89bf5d91/attachment.bin 


More information about the gnucash-user mailing list