Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 975 Bytes

README.md

File metadata and controls

49 lines (35 loc) · 975 Bytes

Simplify-debts

Simplify debts by minimizing transactions. The algorithm does not aim in minimizing transaction amounts but only the number of transactions.

Updated for python3

Run

  1. Create debts file, e.g. example.txt:
# Everyone owes Joe
* -> Joe: 16.80
Sue -> Joe: 24.40
Bob -> Sue: 12.20
# Ellen is part of everyone
Ellen
  1. Run:
$ python3 src/simplify.py <example.txt
Bob -> Joe: 16.4
Sue -> Joe: 16.4
Ellen -> Joe: 4.2

Run with graphviz

$ python3 src/simplify.py -g <example.txt |dot -Tpng >example.png

example graph

Run tests

Robot framework required

$ cd test
$ pybot run-test.txt

License

Licensed with GPLv2.

Thanks

This project is a grateful recipient of the Futurice Open Source sponsorship program. 🌶🦄