-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
60 lines (45 loc) · 2.19 KB
/
README
File metadata and controls
60 lines (45 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
= README FOR DEEBITIFIER =
== DESCRIPTION
Have you ever had the problem that you and your friends have lots of
debts between each other and lots of transactions need to be done for the
debts to be repaid? Dedebtifier tries to solve this problem by simplifying
the debts so that as few transactions as possible have to be done to settle
the debts.
At the moment it is a command line program with limited user interface,
but will be expanded in order to increase usability. It has also not been
tested for more than four people. Consequently the program might not
perform optimal simplification in the general case.
== COMPILING
1. Enter the project directory
2. Create a folder named bin/
1. Run make in the project directory
== INSTALLATION
1. Copy the executable dedebtifier located in bin/ to your path
== USAGE
accumulate debts in file - dedebtifier -f FILE -p PAYER -n NAME -n ... -a AMOUNTS
pretty print debts - dedebtifier -f FILE
print help message - dedebtifier -h
AMOUNTS has the following format: £A£B... where A is the amount
that the first person specified with the -n flag owes the payer
for the payment you are adding. B is the mount that the second
person after a -n flag owes the payer and so on.
=== EXAMPLE:
Robert payed for the groceries for David, Jake, Sam and
himself. The total amount of the shopping was £40. David's
part was £12, Jake's was £15, Sam's was £5 and Robert's
was £8. They had stored their previous debts in a file
called "debt_accumulation". Therefore they would call
dedebtifier like this:
dedebtifier -f debt_accumulation -p Robert -n David -n Jake -n Robert -n Sam -a £12£15£8£5
Then by using 'dedebtifier -f debt_accumulation' they would get the following output:
David owes Robert £12.00
Jake owes Robert £15.00
Sam owes Robert £5.00
If then David payed Robert back 7 of the £12 he owes him they would run the program like this:
dedebtifier -f debt_accumulation -p David -n David -n Jake -n Robert -n Sam -a £0£0£7£0
=== HELPER SCRIPT
In the helper_script folder there is a bash script for making the usage of
dedebtifier less awkward.
== BUGS
Please report any bugs to Robert Welin <robert dot welin at gmail dot
com>