code formating

Friday, June 18, 2010

Ledger the ledger

Ones upon a time, there was a consultant. He only had one client nevertheless he had to pay his taxes. He had to pay insurance and phone expenses. He also had to pay car expenses and he wanted to buy a house. All these numbers started getting messed up in his head and he needed a way out.

After checking out few finance management software he decided stick with ledger. Hell! that ones a right choice. He never had to look back.

Stories aside, life it's never a flat walk but if you are keen on learning, ledger is really a strong alternative. You keep all the transactions in a flat file which you can edit with you favorite editor. An example of a transaction follows:

2010/06/11 cash
Expenses:Other 140 EUR
On the 11nth of June a transaction with a concept of "cash" was made. 140 Euro where transferred from HSBC to an Expenses:Other account.

The most important capability, is however, the ability to query this ledger. Summon the command "ledger" on the command line and a big universe opens before us. With -f "theledgerfile.dat", we choose a file that contains our ledger. Note that we can keep separated ledgers if we wish. The bal tag displays balance and the reg tag displays more detail. Finishing the command with any string, will filter the results to match the string entered.

ledger -f "ourledgerfile.dat" bal HSBC
This command will display the balance of the HSBC account.

There are many tags and possibilities I'm not going to get into now but they are very well explained on the documentation. The documentation can either be found on the source
code or on the downloads page.

1 comment:

Programatically walk a CATIA tree in .NET

One of the most basic tasks when automating anything in CATIA, it's usually to walk the whole tree and apply some changes to objects in ...