aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md62
-rw-r--r--docs/finbudg.1.scd6
-rw-r--r--docs/finbudg.5.scd19
3 files changed, 51 insertions, 36 deletions
diff --git a/README.md b/README.md
index 387800b..ec947f6 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ start_date = 2020-10-01
end_date = 2020-10-31
budget = 420.0
essential_categories = [
- "products",
+ "produce",
"transport",
"utilities",
]
@@ -65,25 +65,29 @@ date = 2020-10-01
[[days.expenses]]
name = "Bacon"
price = 3.33
- category = "products"
- shared = 2
+ category = "produce"
+ shared = ["Fox", "Falco"]
[[days.expenses]]
name = "Yoghurt"
price = 1.24
- category = "products"
- qty = 2
+ category = "produce"
+ owed = true
+ shared = ["Falco"]
[[days.expenses]]
name = "Onion"
price = 0.15
- category = "products"
+ category = "produce"
[[days.expenses]]
name = "Chicken"
price = 2.28
- category = "products"
- shared = 2
+ category = "produce"
+ shared = ["Fox"]
+
+[[days]]
+date = 2020-10-04
[[days]]
date = 2020-10-02
@@ -92,42 +96,46 @@ date = 2020-10-02
name = "VPS"
price = 5.0
category = "utilities"
- recurring = true
[[days.expenses]]
name = "Transport card"
price = 6.9
category = "transport"
+
```
### Output:
```
Your expenses for the period of 2020-10-01 - 2020-10-31
-Last day on entry: 2020-10-02
-Days until period end: 29
+Last day on entry: 2020-10-04
+Days until period end: 27
Budget: 420.00
-Average per day in utilities: 2.50
-Average per day in supplies: 1.91
-Average per day in transport: 3.45
-Average per day in products: 3.50
-Average per day in essential expenses: 9.45
-Average per day: 11.36
+Average per day in produce: 0.60
+Average per day in supplies: 0.95
+Average per day in utilities: 1.25
+Average per day in transport: 1.73
+Average per day in essential expenses: 3.58
+Average per day: 4.53
-Total in products: 7.00
-Total in transport: 6.90
-Total in supplies: 3.81
+Total in produce: 2.40
Total in utilities: 5.00
-Total in essential expenses: 18.90
-Total: 22.71
+Total in supplies: 3.81
+Total in transport: 6.90
+Total in essential expenses: 14.30
+Total: 18.11
+
+Left on balance: 401.89
-Left on balance: 397.29
+Fox owes you in shared expenses: 2.25
+Falco owes you in shared expenses: 2.35
+In total you're owed: 4.60
+Assuming you haven't been repaid, you're left with: 397.29
Days until balance runs out:
-...taking into account all expenses: 34.99
-...taking into account only essential expenses: 42.04
+...taking into account all expenses: 88.77
+...taking into account only essential expenses: 112.42
-Your expenses are healthy, they should last you from your last day on entry
-through your last day of the period.
+Your expenses are healthy, they should last you from your last day on entry through your last day of the period.
```
diff --git a/docs/finbudg.1.scd b/docs/finbudg.1.scd
index 8e3f7e3..e054c9b 100644
--- a/docs/finbudg.1.scd
+++ b/docs/finbudg.1.scd
@@ -17,9 +17,13 @@ a file containing a list of expenses made for a specified period of time. See
# FLAGS
-*-h, --help *
+*-h, --help*
Prints the list of flags available.
+*-w, --consider-owed*
+ Take into account what's owed when calculating the total
+ and subtotals.
+
*-p, --plain*
Don't colorize the output. Can also be set with the *NO_COLOR* environment
variable.
diff --git a/docs/finbudg.5.scd b/docs/finbudg.5.scd
index 72bfd58..ae485c1 100644
--- a/docs/finbudg.5.scd
+++ b/docs/finbudg.5.scd
@@ -56,14 +56,17 @@ The expenses file should contain at the start the following keys:
*category*=String
The category to which this expense belongs. _Optional_.
- *shared*=uint32
- If more than one, then the amount of people this expense was
- shared with. _Optional_.
-
- *recurring*=bool
- Indicates if this is a recurring expense, i.e. one that
- repeats for each period of time. For example, electricity
- bills. _Optional_.
+ *shared*=array<String>
+ An list of names of the people that this expense is shared
+ with proportionally. If owed equals true, then you are not
+ part of this expense, and the people listed here owe you all
+ of this expense. _Optional_.
+
+ *owed*=boolean
+ A boolean value that indicates whether you paid for this for
+ another person or persons. If set to true, then shared
+ should contain at least one name. _Optional_.
+
# NOTES