Ideas for text based budget management and software

I'm looking for suggestions for text-based software or just basic scripts for tracking expenses.

For the last six months I've been recording my purchases in text files, one file for each month. An entry looks like this:01/01/2013,Schnucks,banana, groceries,1.00,cash

It works pretty well for recording info, no alternative system could be much faster than just adding a line to a text file.

Now that I've been recording data for about 6 months, I'm more interested in parsing through it to see what I'm spending in each month and in various categories. At the moment, I just run the files through grep and awk to get what I want. I'm contemplating writing a python program to let me filter and calculate totals and do whatever else comes to mind: importing credit card statements, generating graphs, etc. But at that point, I feel like I'm probably just re-inventing the wheel.

Does anybody want to share how they are handling a similar case?

I'm ok with changing my entry format, but I'm pretty attached to handling things as text files. I don't need anything more complex if it adds to the overhead of creating an entry.

Re: Ideas for text based budget management and software

Hey, I been doing something very similar!Except it also will measure income, so I can know how much I have done/expend this month, week, etc.

I don't have it at hand atm, but I use : to separate the fields, and use slashes to escape it (like \:)Yes, that is a DSV file.I haven't dedicated time to work on it lately, but I was writing a perl script to do the calculations.

One idea I have is to create an additonal file for a list of expenses names, like this:

milk-z:Milk brand Z:milk
milk-y:Milk brand Y:milk

the first field is an unique code for the product, second field a description, and third field is a category.That way I could see how much I have expend on milk, no matter the brand.On the expenses file, an expense would be similar to this:

2012-12-20:expense:milk-z:5.0

The first field has the date, in the format YYYY-MM-DD; that order is important to be able to sort the file if is necessarySecond field has "expense"; it could be "income" if it was an incomeThird field is the product code - if its something I don't buy regulary, I could be only a name (like "new led tv" or something), if is an income, the reason behind the income.And fourth field is just the amount of money.

Oh, I think I'll dedicate some time to the project again

"open source is about choice"No.Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Re: Ideas for text based budget management and software

Trilby wrote:

Have you considered statistical software like GNU R?

You can easily import any/all of your csv files and get descriptive/summary data from them.

R might be worth learning. One benefit of that is I won't have to convert my existing data to a new format. Converting my files to use ledger would take some thinking as it needs certain data like account names that I don't really have in my files.

A quick import of my file into R and glance at a few of the functions was promising. CSV import was painless and with the summary() command is immediately capable of counting occurrences of some term in a column, so i can see the number of cash, credit and check transactions. Hopefully with a little tweaking I can get those to be dollar totals instead of a count.

Other things to learn would be how to do some sort of query/filter on the data and make some useful graphs.

Assuming that has been imported as a data.frame called "budget", you can - as you have, get the summary of the whole table with summary(budget). But you can also get the total spent from `sum(budget$price)`, or more useful, you can get the total spent on grocceries with `sum(budget$price[budget$category == "grocceries"])` which selects the entries in price when the category is grocceries.

That is just one example, the tutorials will give many other examples.