项目作者: yqian1991

项目描述 :
Accounting script
高级语言: Python
项目地址: git://github.com/yqian1991/accounting.git
创建时间: 2017-01-09T04:30:45Z
项目社区:https://github.com/yqian1991/accounting

开源协议:

下载


Accounting

Accounting script

How to use

Record the expense in expense.json

If an amount is shared by all the people, then you can leave “shared_by” empty

  1. {
  2. "qian_yu": {
  3. "1": {
  4. "amount": 84.84, // 84.84 is shared by all
  5. "shared_by": []
  6. }
  7. }
  8. }

If an amount is shared by some people, you should list their names in “shared_by”,
the name must be exactly the same in the file

  1. {
  2. "liu_yang": {
  3. "1": {
  4. "amount": 710.77, // 710.77 is shared by all
  5. "shared_by": []
  6. },
  7. "2": {
  8. "amount": 149.19, // only liu_yang and liu_xinyu should pay for this amount
  9. "shared_by": ["liu_yang", "liu_xinyu"]
  10. }
  11. }
  12. }

As you see, you can also set multiple records for the same person.

Run

  1. python finance.py expense.json

If you are sure the result is right, run the following again to record the result to a txt file

  1. python finance.py expense.json save