This message describes the usage of the 'bank' program itself (it's like the 'yp' commands. what does "yp" stand for? Network Information Services). Future mail will describe accessing 9srv, where O is currently hosted, and individual mail will provide everyone who either doesn't currently have an account or has requested a password reset (currently only ste; unless otherwise requested, i'm leaving the passwords for michael, diaz, plus, cross, tal, ck, and mikea untouched) with their private access information.
Until a web interface exists, there are two ways of accessing bank: a command-line interface and an email interface. Each gives almost the same functionality (as the email interface is basically a way to invoke the bank command remotely). The command line method is preferred, when available to people.
The command 'bank' is a shell script. It essentially looks for the presence of a '-a' option. If it exists, it runs the transaction-adding stuff itself; if not, it punts to the limbo program. First an explanation of entering transactions.
When the '-a' option is given, bank will run through a set of questions with the user interactively. It will ask for transaction date, amount, from and to accounts, and a comment. All these fields' syntax is given in square brackets next to the question. All of these should be fairly straight forward, with the exception of the from/to account syntax for multi-party or weighted transactions, which i'll come back to in a few moments. First, let's look at a transaction entered last night:
:;bank -a
transaction date [[yyyy][mm[dd[hhmm]]]]:
amount of transaction [0.00]: 120
transfer from account(s) [anothy]: cross
transfer to account(s) [anothy]: what/x
comments []: for our new collective box (corrected)
2003-0605-2309 anothy 2003-0605-2309 120.00 cross what/x for our new collective box (corrected)
transaction date [[yyyy][mm[dd[hhmm]]]]: :;
You'll note that the first question is unanswered: i just hit enter. Any question can be left blank. In the case of the transaction date, the current date is used. In the case of the amount and from/to accounts, the defaults printed in square brackets will be used. For the comment, no comment will be issued. Also note that the program responds with confirmation of the line added to the ledger (including entry date and user fields) and then goes on to repeat the questions. You may enter as many transactions this way as you like. To end the process, send a ctl-D.
When the bank script doesn't find the '-a' option, it invokes the bank program proper, with the arguments originally given to the script (if any). It is this bank program that does the more complex work of parsing the ledger file to generate balances. The default case, running 'bank' with no arguments or options, will result in a full list of all balances being printed, highest to lowest, in the conventional notation. Giving a '-d username' option will provide transaction detail for the given account: any transaction involving that account during the requested time (default forever) will be given, including those which the specified account is involved in by virtue of distribution.
For more usage info, 'bank -?' will give you everything except the '-a' option, including a few things not discussed here. Everything except the interactive transaction addition can be done via email by sending a properly formatted command line to
bank@9srvSPAMSUX.net. The normal output from the program, if any, will be mailed to the "From:" address in the email headers. Here, "properly formatted" means either of the form "2003-0528-1245 7 jack jamie,jill lunch", representing, in sequence, the questions the interactive 'bank -a' asks, or any of the other commands the bank program can understand (including the work "bank"), such as 'bank -l'. So for a simple balance inquiry, ' echo bank | mail bank@9srv.net' (given the obvious assumptions about the sending system) will get mail sent back to you.
For WhatExit expenses specifically, two accounts are worth noting: what/a and what/x, for assets and expenses respectively. In particular, note that people should not enter transactions to "what" by itself - everything must either be an asset or an expense. When adding a new physical asset, please us an account of the form "what/a/hw/newthingie". This allows the depreciation calculations to find the individual items to run depreciation on. The "hw" indicates that this is a hardware asset, and the "newthingie" should be a unique string identifying the asset (try grep or bank -d to see if the string's in use). Expenses go in what/x. As no automatic processing is done on expenses, you can use or not use sub-accounts at your discretion. Unless you supply a custom exit rule (an advanced processing option; a topic for another date. you can safely ignore this), they will be rolled up and distributed as though they were in what/x directly. Again, the most important point here is that you should
not enter transactions in the "what" top level account - that violates the schedule of accounts and thus the distribution processing.
Questions? Ask "a".
--
TomLimoncelli - 10 Jul 2003
to top