From: Christian Heller
Date: Sun, 17 Dec 2023 02:22:27 +0000 (+0100)
Subject: Improve accounting scripts.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/day_todos?a=commitdiff_plain;h=bd32647c67dd9a4979a39efaf31bfe63c82c72d0;p=misc
Improve accounting scripts.
---
diff --git a/ledger.py b/ledger.py
index 9ff0d3e..22e36a3 100755
--- a/ledger.py
+++ b/ledger.py
@@ -359,7 +359,6 @@ class LedgerDB(PlomDB):
self.write_text_to_db(text)
def insert_at_date(self, lines, date):
- print("DEBUG insert_at_date")
start_at = 0
if len(self.bookings) > 0:
if date >= self.bookings[-1].date_string:
@@ -375,7 +374,6 @@ class LedgerDB(PlomDB):
return self.write_lines_in_total_lines_at(self.real_lines, start_at, lines)
def update(self, start, end, lines, date):
- print("DEBUG update")
total_lines = self.real_lines[:start] + self.real_lines[end:]
n_original_lines = end - start
start_at = len(total_lines)
diff --git a/todo.py b/todo.py
index 69cb8f5..6cade91 100644
--- a/todo.py
+++ b/todo.py
@@ -61,6 +61,7 @@ to:
"""
todo_tmpl = """
+
todo
@@ -70,16 +71,31 @@ todo_tmpl = """
day weight
comment
done
-
day tags
+
day tags
+
+{% for tag in db.t_tags | sort %}
+{% if tag in todo.task.tags %} â{% else %}{% endif %} {{ tag }}
+{% endfor %}
+add:
+
+
"""
task_tmpl = """
+
task
title
history
{% for k,v in task.title_history.items() | sort(attribute='0', reverse=True) %}
{{ k }}: {{ v|e }}{% endfor %}
default weight
history
{% for k,v in task.default_weight_history.items() | sort(attribute='0', reverse=True) %}
{{ k }}: {{ v|e }}{% endfor %}
-
tags
history
{% for k,v in task.tags_history.items() | sort(attribute='0', reverse=True) %}
{{ k }}: {{ v|e }}{% endfor %}
+
tags
+
+{% for tag in db.t_tags | sort %}
+ {{ tag }}
+{% endfor %}
+add:
+history
{% for k,v in task.tags_history.items() | sort(attribute='0', reverse=True) %}
{{ k }}: {{ v|e }}{% endfor %}
+
"""
@@ -94,17 +110,27 @@ comment:
-
task
choose?
done?
weight
day tags
comment
+
task
choose?
done?
weight
edit?
day tags
comment
{% for uuid, t in db.tasks.items() | sort(attribute='1.title') %}
{% if t.visible and (uuid not in db.selected_day.todos.keys() or db.selected_day.todos[uuid].visible) %}
] {{ t.current_title|e }}tags: {% for tag in t.tags | sort %}{{ tag }} {% endfor %}