README (1591B)
1 This project contains some scripts intended to help you know how 2 much you're spending by and by. 3 4 It works like this; you create an expenses file containing entries 5 with four fields separated by tabs[1], the first being the 6 period--either daily, weekly, bi-weekly, monthly, quarterly, or 7 yearly--the second being the amount, say "30" (as these programs 8 have no knowledge of currency, this could be 30 USD, 30 EUR, 30 9 sheep, whatever you want), the third being a unique identifier[2] 10 (food, gas, etc.), and the fourth being an arbitrary description. 11 (The description leaves room for expansion, I myself put tags within 12 square-brackets (i.e. '[tag]'), but there is no official specification 13 as of yet.) Blank lines and lines proceeded by a hash ('#') are 14 ignored. 15 16 This file is processed by costs.awk, which outputs the amount that 17 each entry costs per "period" (by default, daily, but any may be 18 specified) proceeded by their unique name[3]. 19 20 It can then be further processed by one of the additional scripts 21 provided, total.awk and percentage.awk. Total produces a single 22 entry 'total' that is the sum of all the entries, and percentage 23 replaces the amount from each entry with the percentage of the sum 24 of all the entries. These may be accessed using the wrapper script 25 'costs'; the -t and -p flags respectively. 26 27 [1] I'm contemplating allowing spaces to be field separaters too, but 28 ignoring seperaters after the description field begins. 29 30 [2] If these names are not unique, behavior is undefined. 31 32 [3] I'm considering including their description in the output, as a 33 third field.