pydoto-cli

Simple ToDo-like application, that just works. Add any tasks without closing your terminal.
git clone https://git.nfu.su/pydoto-cli.git
Log | Files | Refs | README

commit 5511571fb4c88e1a2843e62d2041ce5abcbbfe0f
parent 57b4906763c4957106bd4b445fee2cc21b5ef826
Author: Pr0fiTX <uventik999@gmail.com>
Date:   Sun,  6 Jul 2025 14:12:13 +0300

[REF]: Code Refactoring

Diffstat:
Mtasksmanage.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tasksmanage.py b/tasksmanage.py @@ -99,7 +99,7 @@ class Task: def db_load(cls) -> list: """Load tasks from .json into list (AS CLASSES)""" if not os.path.exists(DB_NAME): - print(f"!> File {DB_NAME} doesn't exist. Check --help menu.") + print(f"!> File {DB_NAME} doesn't exist. Use -f flag to create DB or move existing.") exit(1) try: @@ -175,7 +175,9 @@ class Task: def create_db(cls): """Creates DB file (if doesn't exist)""" with open(DB_NAME, "w"): - pass + task = [] + task.append(Task()) + cls.db_dump(task) if os.path.exists(DB_NAME): print("=> DB succesfuly created")