commit 475634600bc5adfaa6bc087a707b9eb6d0f2a795
parent 2ed399b0a36990c57613c2b334ffff32adbad8c1
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Wed, 25 Oct 2023 03:50:38 +0530
Add todo.txt wit design notes
Update october-2023.txt with more entries
Diffstat:
2 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/october-2023.txt b/october-2023.txt
@@ -2,6 +2,23 @@
Expenses:Auto:Gas
Liabilities:MasterCard $-10.00
-2015/10/12 Exide
- Expenses:Auto:Gas
- Assets:Credit $-5.00
+2015/10/12 Donna's Cake World
+ Expenses:Food:Dessert
+ Liabilities:Credit -$5.00
+
+2024/10/25 Zaitoon
+ Expenses:Food:Dinner
+ Liabilities:Credit -$5
+
+2025/10/20 Old loan from friend
+ Assets:Cash
+ Friend:Cash -$200
+
+2024/10/24 Donna's Cake World
+ Expenses:Food:Dessert $5
+ Expenses:Food:Dinner $19
+ Assets:Cash -$24
+
+2015/10/12 Zoho
+ Income:Salary
+ Assets:Bank:Checking $10,000
diff --git a/todo.txt b/todo.txt
@@ -0,0 +1,34 @@
+registers (tree)
+Expenses:
+ ----
+ |- Food:
+ ----
+ |- Dessert(+5)
+ |- Dinner(
+ |- Auto:
+ ----
+ |- Gas
+ |- Gas:
+ ---
+
+ record_tags = {
+ "Food:Dessert"
+}
+balance
+-------
+
+
+ somehow map the get_entries pipe to entry and do the foreach loop, so the loop will work async
+ balance = 0
+ balance_struct (tree) ;
+ for(entry in parse_entries(FILE* f, from = unix_epoch | -e, to = now)) {
+ date = entry->date // useful for sorting?
+ for (record in parse_records(entry)) {
+ int get_rec_ptr = record->nn_name; // to get the string name and to verify with other records
+ int get_val = record->amount;
+ balance_struct.add(get_rec_ptr, get_val); // add value 'get_val' to 'get_rec_ptr'
+ balance += get_val;
+ }
+ printf("-----------------\n");
+ printf("%s %d", denom, balance);
+}