From 70bee705ddb4e9417c2c421f78beb68b5f611bbf Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Mon, 11 Nov 2024 23:14:22 -0500 Subject: [PATCH 1/4] Structure into a package --- ajal_todo_cli/__init__.py | 4 ++++ ajal_todo_cli/__main__.py | 3 +++ todo.py => ajal_todo_cli/app.py | 0 pyproject.toml | 8 ++++++++ 4 files changed, 15 insertions(+) create mode 100644 ajal_todo_cli/__init__.py create mode 100644 ajal_todo_cli/__main__.py rename todo.py => ajal_todo_cli/app.py (100%) diff --git a/ajal_todo_cli/__init__.py b/ajal_todo_cli/__init__.py new file mode 100644 index 0000000..d41baac --- /dev/null +++ b/ajal_todo_cli/__init__.py @@ -0,0 +1,4 @@ +from .app import cli + +if __name__ == '__main__': + cli() diff --git a/ajal_todo_cli/__main__.py b/ajal_todo_cli/__main__.py new file mode 100644 index 0000000..fab757c --- /dev/null +++ b/ajal_todo_cli/__main__.py @@ -0,0 +1,3 @@ +from .app import cli + +cli() diff --git a/todo.py b/ajal_todo_cli/app.py similarity index 100% rename from todo.py rename to ajal_todo_cli/app.py diff --git a/pyproject.toml b/pyproject.toml index 92b933a..35a998e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,3 +7,11 @@ requires-python = ">=3.12" dependencies = [ "typer>=0.13.0", ] +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Topic :: Education", +] + +[project.scripts] +ajal-todo = "ajal_todo_cli:cli" -- 2.45.3 From 35035feba4ec2f5d488c4bf4ce98cf51738be97a Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Mon, 11 Nov 2024 23:21:33 -0500 Subject: [PATCH 2/4] Update docs --- README.md | 11 +++-------- ajal_todo_cli/__main__.py | 2 +- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6acea3a..a86d439 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,9 @@ A todo utility - enhanced ## Usage -You should have `uv` installed or have `virtualenv` or `venv` already set up, and using python 3.12+ - -Run (assuming you are using `uv`): - ```shell -uv venv -source .venv/bin/activate -uv sync +pip install ajal-todo-cli +ajal-todo --help ``` -Now you can run commands, start by running `uv run todo.py --help` and continue from there +And move forward from there diff --git a/ajal_todo_cli/__main__.py b/ajal_todo_cli/__main__.py index fab757c..7faa3e6 100644 --- a/ajal_todo_cli/__main__.py +++ b/ajal_todo_cli/__main__.py @@ -1,3 +1,3 @@ -from .app import cli +from app import cli cli() diff --git a/pyproject.toml b/pyproject.toml index 35a998e..a070885 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ajal-todo-cli" -version = "0.1.0" +version = "0.1.1" description = "Add your description here" readme = "README.md" requires-python = ">=3.12" -- 2.45.3 From c3f6b624d9f0e17e480dc12feb213234dfc22794 Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Mon, 11 Nov 2024 23:30:20 -0500 Subject: [PATCH 3/4] Fix __main__ --- ajal_todo_cli/__main__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ajal_todo_cli/__main__.py b/ajal_todo_cli/__main__.py index 7faa3e6..fab757c 100644 --- a/ajal_todo_cli/__main__.py +++ b/ajal_todo_cli/__main__.py @@ -1,3 +1,3 @@ -from app import cli +from .app import cli cli() diff --git a/pyproject.toml b/pyproject.toml index a070885..29767d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ajal-todo-cli" -version = "0.1.1" +version = "0.1.2" description = "Add your description here" readme = "README.md" requires-python = ">=3.12" -- 2.45.3 From 3d9a25d5a3a5659d5c31481b363d79ee78fd9a35 Mon Sep 17 00:00:00 2001 From: Yehuda Deutsch Date: Tue, 12 Nov 2024 14:41:46 -0500 Subject: [PATCH 4/4] Update doitlive --- breakitlive.sh | 26 +++++++++++++------------- doitlive.sh | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/breakitlive.sh b/breakitlive.sh index 6483028..dea6c32 100644 --- a/breakitlive.sh +++ b/breakitlive.sh @@ -1,18 +1,18 @@ #doitlive speed: 3 #doitlive prompt: sorin -python3 todo.py add Test -python3 todo.py list -r Test -python3 todo.py list -r Test Test +ajal-todo add Test +ajal-todo list -r Test +ajal-todo list -r Test Test -python3 todo.py add -r Test test1 test2 -python3 todo.py add -r Test test1 test3 -python3 todo.py complete -r Test test1 test3 -python3 todo.py remove -r Test test1 test3 +ajal-todo add -r Test test1 test2 +ajal-todo add -r Test test1 test3 +ajal-todo complete -r Test test1 test3 +ajal-todo remove -r Test test1 test3 -python3 todo.py add Test -python3 todo.py list -r Test -python3 todo.py complete -r Test test1 -python3 todo.py add -r Test test1 -python3 todo.py remove -r Test test1 -python3 todo.py remove -r Test test1 +ajal-todo add Test +ajal-todo list -r Test +ajal-todo complete -r Test test1 +ajal-todo add -r Test test1 +ajal-todo remove -r Test test1 +ajal-todo remove -r Test test1 diff --git a/doitlive.sh b/doitlive.sh index 4c71f81..3f2f39e 100644 --- a/doitlive.sh +++ b/doitlive.sh @@ -1,32 +1,32 @@ #doitlive speed: 3 #doitlive prompt: sorin -python3 todo.py --help -python3 todo.py -h; echo $? -python3 todo.py asdf; echo $? +ajal-todo --help +ajal-todo -h; echo $? +ajal-todo asdf; echo $? -python3 todo.py list --help +ajal-todo list --help -python3 todo.py add --help -python3 todo.py add Test -python3 todo.py --verbose add Test -python3 todo.py list -python3 todo.py list --root Test -python3 todo.py add -r Test test -python3 todo.py list -r Test -python3 todo.py list +ajal-todo add --help +ajal-todo add Test +ajal-todo --verbose add Test +ajal-todo list +ajal-todo list --root Test +ajal-todo add -r Test test +ajal-todo list -r Test +ajal-todo list -python3 todo.py complete --help -python3 todo.py complete -r Test test -python3 todo.py --verbose complete -r Test test -python3 todo.py list -r Test -python3 todo.py list -python3 todo.py complete Test -python3 todo.py list +ajal-todo complete --help +ajal-todo complete -r Test test +ajal-todo --verbose complete -r Test test +ajal-todo list -r Test +ajal-todo list +ajal-todo complete Test +ajal-todo list -python3 todo.py remove --help -python3 todo.py remove -r Test test -python3 todo.py list -r Test -python3 todo.py list -python3 todo.py --verbose remove Test -python3 todo.py list +ajal-todo remove --help +ajal-todo remove -r Test test +ajal-todo list -r Test +ajal-todo list +ajal-todo --verbose remove Test +ajal-todo list -- 2.45.3