td-task 0.2.8__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {td_task-0.2.8 → td_task-0.2.9}/PKG-INFO +1 -1
- {td_task-0.2.8 → td_task-0.2.9}/pyproject.toml +1 -1
- {td_task-0.2.8 → td_task-0.2.9}/src/td/CHANGELOG.md +7 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/__main__.py +102 -10
- {td_task-0.2.8 → td_task-0.2.9}/src/td/db.py +14 -0
- {td_task-0.2.8 → td_task-0.2.9}/uv.lock +1 -1
- {td_task-0.2.8 → td_task-0.2.9}/.env.enc +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/.github/workflows/pages.yml +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/.github/workflows/publish.yml +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/.gitignore +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/.python-version +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/README.md +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/assets/demo.gif +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/demo.tape +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/index.html +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/__init__.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/backup.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/config.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/terminal.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/src/td/tui.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_backup.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_cli_notes.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_notes.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_resize.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_tui_notes.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/tests/test_update.py +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/website/README.md +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/website/favicon.svg +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/website/main.js +0 -0
- {td_task-0.2.8 → td_task-0.2.9}/website/style.css +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.9] - 2026-11-30
|
|
4
|
+
- Add `td rm <id>`, `td edit <id> <text>`, `td star <id>`.
|
|
5
|
+
- Add `td note <id>` to display task note content.
|
|
6
|
+
- Add `td append <id> <text>` to add to task notes.
|
|
7
|
+
- Add `td find <query>` to search all lists.
|
|
8
|
+
- Improve CLI help with comprehensive command documentation.
|
|
9
|
+
|
|
3
10
|
## [0.2.8] - 2026-11-30
|
|
4
11
|
- Add `td tick <task_id>` CLI command to toggle task completion.
|
|
5
12
|
- Add `td lists` and `td tasks` CLI commands.
|
|
@@ -94,6 +94,93 @@ def main() -> None:
|
|
|
94
94
|
lists = db.get_all_lists()
|
|
95
95
|
list_name = lists[0] if lists else "main"
|
|
96
96
|
_run_list(list_name)
|
|
97
|
+
elif len(args) > 1 and args[1] == "rm":
|
|
98
|
+
if len(args) < 3:
|
|
99
|
+
print("Usage: td rm <task_id>")
|
|
100
|
+
sys.exit(1)
|
|
101
|
+
try:
|
|
102
|
+
task_id = int(args[2])
|
|
103
|
+
from . import db
|
|
104
|
+
db.delete_task(task_id)
|
|
105
|
+
print(f"✓ Task {task_id} deleted.")
|
|
106
|
+
except ValueError:
|
|
107
|
+
print("✗ Invalid task ID")
|
|
108
|
+
sys.exit(1)
|
|
109
|
+
elif len(args) > 1 and args[1] == "edit":
|
|
110
|
+
if len(args) < 4:
|
|
111
|
+
print("Usage: td edit <task_id> <new_text>")
|
|
112
|
+
sys.exit(1)
|
|
113
|
+
try:
|
|
114
|
+
task_id = int(args[2])
|
|
115
|
+
text = args[3]
|
|
116
|
+
from . import db
|
|
117
|
+
db.update_task_text(task_id, text)
|
|
118
|
+
print(f"✓ Task {task_id} updated.")
|
|
119
|
+
except ValueError:
|
|
120
|
+
print("✗ Invalid task ID")
|
|
121
|
+
sys.exit(1)
|
|
122
|
+
elif len(args) > 1 and args[1] == "star":
|
|
123
|
+
if len(args) < 3:
|
|
124
|
+
print("Usage: td star <task_id>")
|
|
125
|
+
sys.exit(1)
|
|
126
|
+
try:
|
|
127
|
+
task_id = int(args[2])
|
|
128
|
+
from . import db
|
|
129
|
+
if db.toggle_starred(task_id):
|
|
130
|
+
print(f"✓ Task {task_id} starred.")
|
|
131
|
+
else:
|
|
132
|
+
print(f"✗ Failed to star task {task_id} (or max starred reached).")
|
|
133
|
+
except ValueError:
|
|
134
|
+
print("✗ Invalid task ID")
|
|
135
|
+
sys.exit(1)
|
|
136
|
+
elif len(args) > 1 and args[1] == "note":
|
|
137
|
+
if len(args) < 3:
|
|
138
|
+
print("Usage: td note <task_id>")
|
|
139
|
+
sys.exit(1)
|
|
140
|
+
try:
|
|
141
|
+
task_id = int(args[2])
|
|
142
|
+
from . import db
|
|
143
|
+
note = db.get_note_by_task_id(task_id)
|
|
144
|
+
if note:
|
|
145
|
+
print(note["content"])
|
|
146
|
+
else:
|
|
147
|
+
print("✗ No note found for task.")
|
|
148
|
+
except ValueError:
|
|
149
|
+
print("✗ Invalid task ID")
|
|
150
|
+
sys.exit(1)
|
|
151
|
+
elif len(args) > 1 and args[1] == "append":
|
|
152
|
+
if len(args) < 4:
|
|
153
|
+
print("Usage: td append <task_id> <text>")
|
|
154
|
+
sys.exit(1)
|
|
155
|
+
try:
|
|
156
|
+
task_id = int(args[2])
|
|
157
|
+
text = args[3]
|
|
158
|
+
from . import db
|
|
159
|
+
note = db.get_note_by_task_id(task_id)
|
|
160
|
+
if note:
|
|
161
|
+
db.update_note_content(note["id"], note["content"] + "\n" + text)
|
|
162
|
+
print(f"✓ Appended to note {note['id']}.")
|
|
163
|
+
else:
|
|
164
|
+
print("✗ No note found for task.")
|
|
165
|
+
except ValueError:
|
|
166
|
+
print("✗ Invalid task ID")
|
|
167
|
+
sys.exit(1)
|
|
168
|
+
elif len(args) > 1 and args[1] == "find":
|
|
169
|
+
if len(args) < 3:
|
|
170
|
+
print("Usage: td find <query>")
|
|
171
|
+
sys.exit(1)
|
|
172
|
+
query = args[2].lower()
|
|
173
|
+
from . import db
|
|
174
|
+
lists = db.get_all_lists()
|
|
175
|
+
found = False
|
|
176
|
+
for l in lists:
|
|
177
|
+
tasks = db.get_active_tasks(l)
|
|
178
|
+
for t in tasks:
|
|
179
|
+
if query in t["text"].lower() or (t.get("note_title") and query in t["note_title"].lower()):
|
|
180
|
+
print(f"[{l}] {t['id']}: {t['text']}")
|
|
181
|
+
found = True
|
|
182
|
+
if not found:
|
|
183
|
+
print("No matches found.")
|
|
97
184
|
|
|
98
185
|
elif len(args) > 1 and args[1] in ("export", "-export", "--export"):
|
|
99
186
|
_run_export(args)
|
|
@@ -152,16 +239,21 @@ def _run_help() -> None:
|
|
|
152
239
|
commands_table.add_column(style="green")
|
|
153
240
|
commands_table.add_column()
|
|
154
241
|
|
|
155
|
-
commands_table.add_row("
|
|
156
|
-
commands_table.add_row("
|
|
157
|
-
commands_table.add_row("
|
|
158
|
-
commands_table.add_row("
|
|
159
|
-
commands_table.add_row("
|
|
160
|
-
commands_table.add_row("
|
|
161
|
-
commands_table.add_row("
|
|
162
|
-
commands_table.add_row("
|
|
163
|
-
commands_table.add_row("
|
|
164
|
-
commands_table.add_row("
|
|
242
|
+
commands_table.add_row(" add <text>", "Add task to active list")
|
|
243
|
+
commands_table.add_row(" tick <id>", "Toggle task completion")
|
|
244
|
+
commands_table.add_row(" rm <id>", "Delete task")
|
|
245
|
+
commands_table.add_row(" edit <id> <text>", "Update task text")
|
|
246
|
+
commands_table.add_row(" star <id>", "Toggle task star/pin")
|
|
247
|
+
commands_table.add_row(" note <id>", "Display task note content")
|
|
248
|
+
commands_table.add_row(" append <id> <text>", "Append to task note")
|
|
249
|
+
commands_table.add_row(" find <query>", "Search all tasks/notes")
|
|
250
|
+
commands_table.add_row(" lists", "List all available lists")
|
|
251
|
+
commands_table.add_row(" tasks", "List tasks in active/default list")
|
|
252
|
+
commands_table.add_row(" notes <action>", "Manage Markdown notes")
|
|
253
|
+
commands_table.add_row(" archive", "Open TUI archive screen")
|
|
254
|
+
commands_table.add_row(" export/import", "Manage database files")
|
|
255
|
+
commands_table.add_row(" backup/restore", "GitHub backup operations")
|
|
256
|
+
commands_table.add_row(" update", "Upgrade td package")
|
|
165
257
|
|
|
166
258
|
console.print(commands_table)
|
|
167
259
|
console.print()
|
|
@@ -1057,6 +1057,20 @@ def get_note(note_id: int) -> dict | None:
|
|
|
1057
1057
|
conn.close()
|
|
1058
1058
|
|
|
1059
1059
|
|
|
1060
|
+
def get_note_by_task_id(task_id: int) -> dict | None:
|
|
1061
|
+
conn = _connect()
|
|
1062
|
+
try:
|
|
1063
|
+
row = conn.execute(
|
|
1064
|
+
"SELECT notes.id FROM notes WHERE task_id = ?",
|
|
1065
|
+
(task_id,),
|
|
1066
|
+
).fetchone()
|
|
1067
|
+
if row is None:
|
|
1068
|
+
return None
|
|
1069
|
+
return get_note(row["id"])
|
|
1070
|
+
finally:
|
|
1071
|
+
conn.close()
|
|
1072
|
+
|
|
1073
|
+
|
|
1060
1074
|
def get_note_list_name(note_id: int) -> str | None:
|
|
1061
1075
|
conn = _connect()
|
|
1062
1076
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|