Monday, 29 September 2008

More Buxfer goodies (this time, a backup script)

I just realized that I'm putting a fair amount of effort (and information) on Buxfer. Been tracking rather faithfully my expenses for a month, and I'm rather happy with the service.

But what if it someday fails, or disappears? What about the data? It seems to have a data export facility implemented, but it's for Pro accounts only. Okay, it seems like either I misread the membership plans, or they changed them. Either way, the data export is good for when you want to take a look at the statements in excel, but as far as a backup goes, it's no good for me.

A backup must be something I don't have to think about for it to work. It should do its job in the background as much as possible, and only warn me if something goes wrong. Thankfully Buxfer's API has enough functionality to cover this.

This is a small script that fetches all transactions from your Buxfer accounts (or one particular account) to disk. It has some smarts implemented to "continue" a previous backup, so you can setup a scheduled task periodically to fetch the transactions, and it should just fetch the new ones after the first run.

So far it stores the info as pure json, which was the easiest way to implement it. Should I require in the future to actually act on this, I can parse the json again and convert it to csv, or any other format I need.

The source is here, and a skeleton configuration file is here.

To use it you'll need Python (I tested it with 2.5, but I think it should work with 2.4) and simplejson.

Configuration should be self-explanatory, it needs you to fill out your username, password, and filename for backup.

To run it, you can pass the path to the configuration file (this way you can have several different configurations, one for each account, or for different users).

I guess this is it. Any questions, feedback or general chat, just leave a comment.

That's all, folks!

2 comments:

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

The machine routinely calculates the number of credit the participant receives in exchange for the cash inserted. Newer machines typically permit players to choose from|to select from} a choice of denominations on a splash display or menu. A favorite separate bonus recreation for video slots, mostly with an interactive component, like the participant choosing mystery prize boxes or taking part in} a larger or decrease recreation. If discover yourself|you 카지노사이트 finish up} sitting alone at a on line casino the center of|in the midst of|in the course of} the night amid a room filled with strangers, this analysis can spark an examination between your motivation and temper. Because for some people, taking part in} slots is extra about escape than entertainment, looking for assist for underlying signs is in order. If you suffer from melancholy, consider the variety of various shops and healthier choices designed to enable you to enhance your temper, spend your time with your family members, and save your cash.