zrb 1.0.0a9__tar.gz → 1.0.0a11__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.
- {zrb-1.0.0a9 → zrb-1.0.0a11}/PKG-INFO +1 -2
- {zrb-1.0.0a9 → zrb-1.0.0a11}/pyproject.toml +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/__main__.py +6 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/__init__.py +13 -5
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/group.py +1 -10
- {zrb-1.0.0a9/src/zrb/builtin/setup/dev → zrb-1.0.0a11/src/zrb/builtin/setup/asdf}/asdf.py +8 -8
- {zrb-1.0.0a9/src/zrb/builtin/setup/system → zrb-1.0.0a11/src/zrb/builtin/setup}/latex/ubuntu.py +1 -1
- {zrb-1.0.0a9/src/zrb/builtin/setup/dev → zrb-1.0.0a11/src/zrb/builtin/setup/tmux}/tmux.py +3 -3
- zrb-1.0.0a11/src/zrb/builtin/setup/tmux/tmux_config.sh +12 -0
- {zrb-1.0.0a9/src/zrb/builtin/setup/system → zrb-1.0.0a11/src/zrb/builtin/setup}/ubuntu.py +2 -2
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/todo.py +50 -15
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/config.py +1 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/base_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/bool_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/float_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/int_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/option_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/password_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/text_input.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/load.py +4 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/todo.py +98 -35
- zrb-1.0.0a9/src/zrb/builtin/setup/dev/tmux_config.sh +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/README.md +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/attr/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/attr/type.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/base64.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/git.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/git_subtree.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/llm/llm_chat.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/llm/tool/cli.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/llm/tool/rag.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/llm/tool/web.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/md5.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/.gitignore +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/README.md +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/_zrb/config.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/_zrb/group.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/_zrb/helper.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/_zrb/main.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/_zrb/venv_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/app.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/db_engine.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/db_repository.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/error.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/schema.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/common/usecase.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/config.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/main.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/migrate.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/alembic.ini +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/api_client.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/base_client.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/direct_client.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/factory.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/README +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/env.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/script.py.mako +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/versions/3093c7336477_add_user_table.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration_metadata.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/route.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/db_repository.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/factory.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/repository.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/usecase.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/alembic.ini +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/README +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/env.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/script.py.mako +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/versions/.gitkeep +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration_metadata.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/module/gateway/route.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/requirements.txt +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/schema/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/schema/role.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/schema/user.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/add/fastapp_template/template.env +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/create/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/create/create.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/create/project-template/README.md +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/project/create/project-template/zrb_init.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/python.py +0 -0
- {zrb-1.0.0a9/src/zrb/builtin/setup/dev → zrb-1.0.0a11/src/zrb/builtin/setup/asdf}/asdf_helper.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/setup/common_input.py +0 -0
- {zrb-1.0.0a9/src/zrb/builtin/setup/dev → zrb-1.0.0a11/src/zrb/builtin/setup/tmux}/tmux_helper.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/shell/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/shell/autocomplete/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/shell/autocomplete/bash.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/shell/autocomplete/subcmd.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/builtin/shell/autocomplete/zsh.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/callback/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/callback/any_callback.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/callback/callback.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/cmd/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/cmd/cmd_result.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/cmd/cmd_val.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/content_transformer/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/content_transformer/any_content_transformer.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/content_transformer/content_transformer.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/context/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/context/any_context.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/context/any_shared_context.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/context/context.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/context/shared_context.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/dot_dict/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/dot_dict/dot_dict.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/env/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/env/any_env.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/env/env.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/env/env_file.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/env/env_map.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/group/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/group/any_group.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/group/group.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/any_input.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/input/str_input.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/cli.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_app.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/controller.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/partial/group_info.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/partial/group_li.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/partial/task_info.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/partial/task_li.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/group_info_ui/view.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/controller.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/partial/group_info.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/partial/group_li.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/partial/task_info.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/partial/task_li.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/home_page/view.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/static/favicon-32x32.png +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/static/pico.min.css +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/controller.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/partial/common-util.js +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/partial/input.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/partial/main.js +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/partial/show-existing-session.js +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/partial/visualize-history.js +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_controller/task_ui/view.html +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/runner/web_util.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session/any_session.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session/session.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_log/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_log/session_state_log.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_logger/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_logger/any_session_state_logger.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_logger/default_session_state_logger.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/session_state_logger/file_session_state_logger.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/any_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/base_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/base_trigger.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/cmd_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/http_check.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/llm_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/make_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/rsync_task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/scaffolder.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/scheduler.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/task.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task/tcp_check.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task_status/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/task_status/task_status.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/attr.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cli/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cli/style.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cli/subcommand.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cmd/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cmd/command.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cmd/remote.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_code_to_class.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_code_to_function.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_code_to_method.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_key_to_dict.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_param_to_function_call.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_parent_to_class.py +1 -1
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/codemod/add_property_to_class.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/cron.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/git.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/git_subtree.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/group.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/llm/tool.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/run.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/string/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/string/conversion.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/string/format.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/util/string/name.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/xcom/__init__.py +0 -0
- {zrb-1.0.0a9 → zrb-1.0.0a11}/src/zrb/xcom/xcom.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: zrb
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.0a11
|
4
4
|
Summary: Your Automation Powerhouse
|
5
5
|
Home-page: https://github.com/state-alchemists/zrb
|
6
6
|
License: AGPL-3.0-or-later
|
@@ -13,7 +13,6 @@ Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
16
|
-
Classifier: Programming Language :: Python :: 3.13
|
17
16
|
Provides-Extra: rag
|
18
17
|
Requires-Dist: autopep8 (>=2.0.4,<3.0.0)
|
19
18
|
Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
|
@@ -1,12 +1,18 @@
|
|
1
1
|
import sys
|
2
2
|
|
3
|
+
from zrb.config import INIT_MODULES, INIT_SCRIPTS
|
3
4
|
from zrb.runner.cli import cli
|
4
5
|
from zrb.util.cli.style import stylize_error, stylize_warning
|
5
6
|
from zrb.util.group import NodeNotFoundError
|
7
|
+
from zrb.util.load import load_file, load_module
|
6
8
|
|
7
9
|
|
8
10
|
def serve_cli():
|
9
11
|
try:
|
12
|
+
for init_module in INIT_MODULES:
|
13
|
+
load_module(init_module)
|
14
|
+
for init_script in INIT_SCRIPTS:
|
15
|
+
load_file(init_script, -1)
|
10
16
|
cli.run(sys.argv[1:])
|
11
17
|
except KeyboardInterrupt:
|
12
18
|
print(stylize_warning("\nStopped"), file=sys.stderr)
|
@@ -12,14 +12,21 @@ from zrb.builtin.md5 import hash_md5, sum_md5
|
|
12
12
|
from zrb.builtin.project.add.fastapp import add_fastapp_to_project
|
13
13
|
from zrb.builtin.project.create.create import create_project
|
14
14
|
from zrb.builtin.python import format_python_code
|
15
|
-
from zrb.builtin.setup.
|
16
|
-
from zrb.builtin.setup.
|
17
|
-
from zrb.builtin.setup.
|
18
|
-
from zrb.builtin.setup.
|
15
|
+
from zrb.builtin.setup.asdf.asdf import setup_asdf
|
16
|
+
from zrb.builtin.setup.latex.ubuntu import setup_latex_on_ubuntu
|
17
|
+
from zrb.builtin.setup.tmux.tmux import setup_tmux
|
18
|
+
from zrb.builtin.setup.ubuntu import setup_ubuntu
|
19
19
|
from zrb.builtin.shell.autocomplete.bash import make_bash_autocomplete
|
20
20
|
from zrb.builtin.shell.autocomplete.subcmd import get_shell_subcommands
|
21
21
|
from zrb.builtin.shell.autocomplete.zsh import make_zsh_autocomplete
|
22
|
-
from zrb.builtin.todo import
|
22
|
+
from zrb.builtin.todo import (
|
23
|
+
add_todo,
|
24
|
+
archive_todo,
|
25
|
+
complete_todo,
|
26
|
+
edit_todo,
|
27
|
+
list_todo,
|
28
|
+
log_todo,
|
29
|
+
)
|
23
30
|
|
24
31
|
assert create_project
|
25
32
|
assert add_fastapp_to_project
|
@@ -42,6 +49,7 @@ assert git_pull_subtree
|
|
42
49
|
assert git_push_subtree
|
43
50
|
assert list_todo
|
44
51
|
assert add_todo
|
52
|
+
assert archive_todo
|
45
53
|
assert edit_todo
|
46
54
|
assert complete_todo
|
47
55
|
assert log_todo
|
@@ -34,15 +34,6 @@ add_fastapp_to_project_group = add_to_project_group.add_group(
|
|
34
34
|
)
|
35
35
|
|
36
36
|
setup_group = cli.add_group(Group(name="setup", description="🔧 Setup"))
|
37
|
-
|
38
|
-
Group(name="system", description="🔧 Setup system")
|
39
|
-
)
|
40
|
-
setup_latex_group = setup_system_group.add_group(
|
37
|
+
setup_latex_group = setup_group.add_group(
|
41
38
|
Group(name="latex", description="✍️ Setup LaTeX")
|
42
39
|
)
|
43
|
-
setup_dev_group = setup_group.add_group(
|
44
|
-
Group(name="dev", description="💻 Setup developer tools")
|
45
|
-
)
|
46
|
-
setup_service_group = setup_group.add_group(
|
47
|
-
Group(name="services", description="🌐 Setup services")
|
48
|
-
)
|
@@ -1,6 +1,12 @@
|
|
1
1
|
import os
|
2
2
|
|
3
|
-
from zrb.builtin.group import
|
3
|
+
from zrb.builtin.group import setup_group
|
4
|
+
from zrb.builtin.setup.asdf.asdf_helper import (
|
5
|
+
check_inexist_asdf_dir,
|
6
|
+
get_install_prerequisites_cmd,
|
7
|
+
setup_asdf_ps_config,
|
8
|
+
setup_asdf_sh_config,
|
9
|
+
)
|
4
10
|
from zrb.builtin.setup.common_input import (
|
5
11
|
package_manager_input,
|
6
12
|
setup_bash_input,
|
@@ -8,12 +14,6 @@ from zrb.builtin.setup.common_input import (
|
|
8
14
|
setup_zsh_input,
|
9
15
|
use_sudo_input,
|
10
16
|
)
|
11
|
-
from zrb.builtin.setup.dev.asdf_helper import (
|
12
|
-
check_inexist_asdf_dir,
|
13
|
-
get_install_prerequisites_cmd,
|
14
|
-
setup_asdf_ps_config,
|
15
|
-
setup_asdf_sh_config,
|
16
|
-
)
|
17
17
|
from zrb.context.any_context import AnyContext
|
18
18
|
from zrb.task.cmd_task import CmdTask
|
19
19
|
from zrb.task.make_task import make_task
|
@@ -71,7 +71,7 @@ def setup_asdf_on_powershell(ctx: AnyContext):
|
|
71
71
|
@make_task(
|
72
72
|
name="setup-asdf",
|
73
73
|
description="🧰 Setup `asdf`.",
|
74
|
-
group=
|
74
|
+
group=setup_group,
|
75
75
|
alias="asdf",
|
76
76
|
)
|
77
77
|
def setup_asdf(ctx: AnyContext):
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import os
|
2
2
|
|
3
|
-
from zrb.builtin.group import
|
3
|
+
from zrb.builtin.group import setup_group
|
4
4
|
from zrb.builtin.setup.common_input import package_manager_input, use_sudo_input
|
5
|
-
from zrb.builtin.setup.
|
5
|
+
from zrb.builtin.setup.tmux.tmux_helper import get_install_tmux_cmd
|
6
6
|
from zrb.context.any_context import AnyContext
|
7
7
|
from zrb.input.str_input import StrInput
|
8
8
|
from zrb.task.cmd_task import CmdTask
|
@@ -24,7 +24,7 @@ install_tmux = CmdTask(
|
|
24
24
|
default_str="~/.tmux.conf",
|
25
25
|
),
|
26
26
|
description="🖥️ Setup `tmux`.",
|
27
|
-
group=
|
27
|
+
group=setup_group,
|
28
28
|
alias="tmux",
|
29
29
|
)
|
30
30
|
def setup_tmux(ctx: AnyContext):
|
@@ -0,0 +1,12 @@
|
|
1
|
+
set -g @plugin 'tmux-plugins/tpm'
|
2
|
+
set -g @plugin 'tmux-plugins/tmux-sensible'
|
3
|
+
run '~/.tmux/plugins/tpm/tpm'
|
4
|
+
|
5
|
+
set-option -sg escape-time 10
|
6
|
+
set-option -g focus-events On
|
7
|
+
set-option -g default-terminal "screen-256color"
|
8
|
+
set-option -sa terminal-overrides ',xterm-256color:RGB'
|
9
|
+
|
10
|
+
bind c new-window -c "#{pane_current_path}"
|
11
|
+
bind '"' split-window -c "#{pane_current_path}"
|
12
|
+
bind % split-window -h -c "#{pane_current_path}"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from zrb.builtin.group import
|
1
|
+
from zrb.builtin.group import setup_group
|
2
2
|
from zrb.task.cmd_task import CmdTask
|
3
3
|
|
4
4
|
update_ubuntu = CmdTask(name="update-ubuntu", cmd="sudo apt update", render_cmd=False)
|
@@ -8,7 +8,7 @@ upgrade_todo = CmdTask(
|
|
8
8
|
)
|
9
9
|
update_ubuntu >> upgrade_todo
|
10
10
|
|
11
|
-
setup_ubuntu =
|
11
|
+
setup_ubuntu = setup_group.add_task(
|
12
12
|
CmdTask(
|
13
13
|
name="setup-ubuntu",
|
14
14
|
description="🐧 Setup ubuntu",
|
@@ -4,7 +4,7 @@ import os
|
|
4
4
|
from typing import Any
|
5
5
|
|
6
6
|
from zrb.builtin.group import todo_group
|
7
|
-
from zrb.config import TODO_DIR
|
7
|
+
from zrb.config import TODO_DIR, TODO_VISUAL_FILTER
|
8
8
|
from zrb.context.any_context import AnyContext
|
9
9
|
from zrb.input.str_input import StrInput
|
10
10
|
from zrb.input.text_input import TextInput
|
@@ -23,7 +23,7 @@ from zrb.util.todo import (
|
|
23
23
|
|
24
24
|
|
25
25
|
@make_task(
|
26
|
-
name="todo
|
26
|
+
name="add-todo",
|
27
27
|
input=[
|
28
28
|
StrInput(
|
29
29
|
name="description",
|
@@ -77,20 +77,20 @@ def add_todo(ctx: AnyContext):
|
|
77
77
|
)
|
78
78
|
)
|
79
79
|
save_todo_list(todo_file_path, todo_list)
|
80
|
-
return get_visual_todo_list(todo_list)
|
80
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
81
81
|
|
82
82
|
|
83
|
-
@make_task(name="todo
|
83
|
+
@make_task(name="list-todo", description="📋 List todo", group=todo_group, alias="list")
|
84
84
|
def list_todo(ctx: AnyContext):
|
85
85
|
todo_file_path = os.path.join(TODO_DIR, "todo.txt")
|
86
|
-
|
86
|
+
todo_list: list[TodoTaskModel] = []
|
87
87
|
if os.path.isfile(todo_file_path):
|
88
|
-
|
89
|
-
return get_visual_todo_list(
|
88
|
+
todo_list = load_todo_list(todo_file_path)
|
89
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
90
90
|
|
91
91
|
|
92
92
|
@make_task(
|
93
|
-
name="todo
|
93
|
+
name="complete-todo",
|
94
94
|
input=StrInput(name="keyword", prompt="Task keyword", description="Task Keyword"),
|
95
95
|
description="✅ Complete todo",
|
96
96
|
group=todo_group,
|
@@ -105,7 +105,10 @@ def complete_todo(ctx: AnyContext):
|
|
105
105
|
todo_task = select_todo_task(todo_list, ctx.input.keyword)
|
106
106
|
if todo_task is None:
|
107
107
|
ctx.log_error("Task not found")
|
108
|
-
return get_visual_todo_list(todo_list)
|
108
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
109
|
+
if todo_task.completed:
|
110
|
+
ctx.log_error("Task already completed")
|
111
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
109
112
|
# Update todo task
|
110
113
|
todo_task = cascade_todo_task(todo_task)
|
111
114
|
if todo_task.creation_date is not None:
|
@@ -113,11 +116,43 @@ def complete_todo(ctx: AnyContext):
|
|
113
116
|
todo_task.completed = True
|
114
117
|
# Save todo list
|
115
118
|
save_todo_list(todo_file_path, todo_list)
|
116
|
-
return get_visual_todo_list(todo_list)
|
119
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
120
|
+
|
121
|
+
|
122
|
+
@make_task(
|
123
|
+
name="archive-todo",
|
124
|
+
description="📚 Archive todo",
|
125
|
+
group=todo_group,
|
126
|
+
alias="archive",
|
127
|
+
)
|
128
|
+
def archive_todo(ctx: AnyContext):
|
129
|
+
todo_file_path = os.path.join(TODO_DIR, "todo.txt")
|
130
|
+
todo_list: list[TodoTaskModel] = []
|
131
|
+
if os.path.isfile(todo_file_path):
|
132
|
+
todo_list = load_todo_list(todo_file_path)
|
133
|
+
working_todo_list = [
|
134
|
+
todo_task for todo_task in todo_list if not todo_task.completed
|
135
|
+
]
|
136
|
+
new_archived_todo_list = [
|
137
|
+
todo_task for todo_task in todo_list if todo_task.completed
|
138
|
+
]
|
139
|
+
if len(new_archived_todo_list) == 0:
|
140
|
+
ctx.print("No completed task to archive")
|
141
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
142
|
+
archive_file_path = os.path.join(TODO_DIR, "archive.txt")
|
143
|
+
if not os.path.isdir(TODO_DIR):
|
144
|
+
os.make_dirs(TODO_DIR, exist_ok=True)
|
145
|
+
archived_todo_list = []
|
146
|
+
if os.path.isfile(archive_file_path):
|
147
|
+
archived_todo_list = load_todo_list(archive_file_path)
|
148
|
+
archived_todo_list += new_archived_todo_list
|
149
|
+
save_todo_list(archive_file_path, archived_todo_list)
|
150
|
+
save_todo_list(todo_file_path, working_todo_list)
|
151
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
117
152
|
|
118
153
|
|
119
154
|
@make_task(
|
120
|
-
name="todo
|
155
|
+
name="log-todo",
|
121
156
|
input=[
|
122
157
|
StrInput(name="keyword", prompt="Task keyword", description="Task Keyword"),
|
123
158
|
StrInput(
|
@@ -151,7 +186,7 @@ def log_todo(ctx: AnyContext):
|
|
151
186
|
todo_task = select_todo_task(todo_list, ctx.input.keyword)
|
152
187
|
if todo_task is None:
|
153
188
|
ctx.log_error("Task not found")
|
154
|
-
return get_visual_todo_list(todo_list)
|
189
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
155
190
|
# Update todo task
|
156
191
|
todo_task = cascade_todo_task(todo_task)
|
157
192
|
current_duration = todo_task.keyval.get("duration", "0")
|
@@ -175,7 +210,7 @@ def log_todo(ctx: AnyContext):
|
|
175
210
|
)
|
176
211
|
with open(log_work_file_path, "w") as f:
|
177
212
|
f.write(json.dumps(log_work, indent=2))
|
178
|
-
return get_visual_todo_list(todo_list)
|
213
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
179
214
|
|
180
215
|
|
181
216
|
def _get_default_start() -> str:
|
@@ -183,7 +218,7 @@ def _get_default_start() -> str:
|
|
183
218
|
|
184
219
|
|
185
220
|
@make_task(
|
186
|
-
name="todo
|
221
|
+
name="edit-todo",
|
187
222
|
input=[
|
188
223
|
TextInput(
|
189
224
|
name="text",
|
@@ -207,7 +242,7 @@ def edit_todo(ctx: AnyContext):
|
|
207
242
|
with open(todo_file_path, "w") as f:
|
208
243
|
f.write(new_content)
|
209
244
|
todo_list = load_todo_list(todo_file_path)
|
210
|
-
return get_visual_todo_list(todo_list)
|
245
|
+
return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
|
211
246
|
|
212
247
|
|
213
248
|
def _get_todo_txt_content() -> str:
|
@@ -56,6 +56,7 @@ SESSION_LOG_DIR = os.getenv(
|
|
56
56
|
"ZRB_SESSION_LOG_DIR", os.path.expanduser(os.path.join("~", ".zrb-session"))
|
57
57
|
)
|
58
58
|
TODO_DIR = os.getenv("ZRB_TODO_DIR", os.path.expanduser(os.path.join("~", "todo")))
|
59
|
+
TODO_VISUAL_FILTER = os.getenv("ZRB_TODO_FILTER", "")
|
59
60
|
VERSION = metadata.version("zrb")
|
60
61
|
WEB_HTTP_PORT = int(os.getenv("ZRB_WEB_HTTP_PORT", "21213"))
|
61
62
|
LLM_MODEL = os.getenv("ZRB_LLM_MODEL", "ollama_chat/llama3.1")
|
@@ -16,7 +16,7 @@ class TextInput(BaseInput):
|
|
16
16
|
prompt: str | None = None,
|
17
17
|
default_str: str | Callable[[AnySharedContext], str] = "",
|
18
18
|
auto_render: bool = True,
|
19
|
-
allow_empty: bool =
|
19
|
+
allow_empty: bool = False,
|
20
20
|
editor: str = DEFAULT_EDITOR,
|
21
21
|
extension: str = ".txt",
|
22
22
|
comment_start: str | None = None,
|
@@ -3,6 +3,7 @@ import importlib.util
|
|
3
3
|
import os
|
4
4
|
import re
|
5
5
|
import sys
|
6
|
+
from functools import lru_cache
|
6
7
|
from typing import Any
|
7
8
|
|
8
9
|
pattern = re.compile("[^a-zA-Z0-9]")
|
@@ -13,7 +14,7 @@ def load_zrb_init(dir_path: str | None = None):
|
|
13
14
|
dir_path = os.getcwd()
|
14
15
|
script_path = os.path.join(dir_path, "zrb_init.py")
|
15
16
|
if os.path.isfile(script_path):
|
16
|
-
load_file(script_path)
|
17
|
+
load_file(script_path, -1)
|
17
18
|
return
|
18
19
|
new_dir_path = os.path.dirname(dir_path)
|
19
20
|
if new_dir_path == dir_path:
|
@@ -21,6 +22,7 @@ def load_zrb_init(dir_path: str | None = None):
|
|
21
22
|
load_zrb_init(new_dir_path)
|
22
23
|
|
23
24
|
|
25
|
+
@lru_cache()
|
24
26
|
def load_file(script_path: str, sys_path_index: int = 0):
|
25
27
|
if not os.path.isfile(script_path):
|
26
28
|
return
|
@@ -45,6 +47,7 @@ def _get_new_python_path(dir_path: str) -> str:
|
|
45
47
|
return ":".join([current_python_path, dir_path])
|
46
48
|
|
47
49
|
|
50
|
+
@lru_cache()
|
48
51
|
def load_module(module_name: str) -> Any:
|
49
52
|
module = importlib.import_module(module_name)
|
50
53
|
return module
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import datetime
|
2
2
|
import re
|
3
|
+
import shutil
|
3
4
|
|
4
5
|
from pydantic import BaseModel, Field, model_validator
|
5
6
|
|
@@ -32,6 +33,16 @@ class TodoTaskModel(BaseModel):
|
|
32
33
|
)
|
33
34
|
return values
|
34
35
|
|
36
|
+
def get_additional_info_length(self):
|
37
|
+
results = []
|
38
|
+
for project in self.projects:
|
39
|
+
results.append(f"@{project}")
|
40
|
+
for context in self.contexts:
|
41
|
+
results.append(f"+{context}")
|
42
|
+
for key, val in self.keyval.items():
|
43
|
+
results.append(f"{key}:{val}")
|
44
|
+
return len(", ".join(results))
|
45
|
+
|
35
46
|
|
36
47
|
TODO_TXT_PATTERN = re.compile(
|
37
48
|
r"^(?P<status>x)?\s*" # Optional completion mark ('x')
|
@@ -80,7 +91,8 @@ def load_todo_list(todo_file_path: str) -> list[TodoTaskModel]:
|
|
80
91
|
todo_line = todo_line.strip()
|
81
92
|
if todo_line == "":
|
82
93
|
continue
|
83
|
-
|
94
|
+
todo_task = line_to_todo_task(todo_line)
|
95
|
+
todo_list.append(todo_task)
|
84
96
|
todo_list.sort(
|
85
97
|
key=lambda task: (
|
86
98
|
task.completed,
|
@@ -173,53 +185,104 @@ def todo_task_to_line(task: TodoTaskModel) -> str:
|
|
173
185
|
return " ".join(parts)
|
174
186
|
|
175
187
|
|
176
|
-
def get_visual_todo_list(todo_list: list[TodoTaskModel]) -> str:
|
177
|
-
|
188
|
+
def get_visual_todo_list(todo_list: list[TodoTaskModel], filter: str) -> str:
|
189
|
+
todo_filter = line_to_todo_task(filter)
|
190
|
+
filtered_todo_list = []
|
191
|
+
for todo_task in todo_list:
|
192
|
+
filter_description = todo_filter.description.lower().strip()
|
193
|
+
if (
|
194
|
+
filter_description != ""
|
195
|
+
and filter_description not in todo_task.description.lower()
|
196
|
+
):
|
197
|
+
continue
|
198
|
+
if not all(context in todo_task.contexts for context in todo_filter.contexts):
|
199
|
+
continue
|
200
|
+
if not all(project in todo_task.projects for project in todo_filter.projects):
|
201
|
+
continue
|
202
|
+
if not all(
|
203
|
+
key in todo_task.keyval and todo_task.keyval[key] == val
|
204
|
+
for key, val in todo_filter.keyval.items()
|
205
|
+
):
|
206
|
+
continue
|
207
|
+
filtered_todo_list.append(todo_task)
|
208
|
+
if len(filtered_todo_list) == 0:
|
178
209
|
return "\n".join(["", " Empty todo list... 🌵🦖", ""])
|
179
|
-
|
180
|
-
|
181
|
-
|
210
|
+
max_desc_length = max(
|
211
|
+
len(todo_task.description) for todo_task in filtered_todo_list
|
212
|
+
)
|
213
|
+
if max_desc_length < len("DESCRIPTION"):
|
214
|
+
max_desc_length = len("DESCRIPTION")
|
215
|
+
if max_desc_length > 70:
|
216
|
+
max_desc_length = 70
|
217
|
+
max_additional_info_length = max(
|
218
|
+
todo_task.get_additional_info_length() for todo_task in filtered_todo_list
|
219
|
+
)
|
220
|
+
if max_additional_info_length < len("PROJECT/CONTEXT/OTHERS"):
|
221
|
+
max_additional_info_length = len("PROJECT/CONTEXT/OTHERS")
|
222
|
+
terminal_width, _ = shutil.get_terminal_size()
|
182
223
|
# Headers
|
183
224
|
results = [
|
184
225
|
stylize_bold_green(
|
185
|
-
|
186
|
-
|
187
|
-
"".ljust(3), # priority
|
188
|
-
"".ljust(3), # completed
|
189
|
-
"COMPLETED AT".rjust(14), # completed date
|
190
|
-
"CREATED AT".rjust(14), # completed date
|
191
|
-
"DESCRIPTION".ljust(max_desc_name_length),
|
192
|
-
"PROJECT/CONTEXT/OTHERS",
|
193
|
-
]
|
226
|
+
get_visual_todo_header(
|
227
|
+
terminal_width, max_desc_length, max_additional_info_length
|
194
228
|
)
|
195
229
|
)
|
196
230
|
]
|
197
|
-
for todo_task in
|
198
|
-
completed = "[x]" if todo_task.completed else "[ ]"
|
199
|
-
priority = " " if todo_task.priority is None else f"({todo_task.priority})"
|
200
|
-
completion_date = stylize_yellow(_date_to_str(todo_task.completion_date))
|
201
|
-
creation_date = stylize_cyan(_date_to_str(todo_task.creation_date))
|
202
|
-
description = todo_task.description.ljust(max_desc_name_length)
|
203
|
-
additions = ", ".join(
|
204
|
-
[stylize_yellow(f"+{project}") for project in todo_task.projects]
|
205
|
-
+ [stylize_cyan(f"@{context}") for context in todo_task.contexts]
|
206
|
-
+ [stylize_magenta(f"{key}:{val}") for key, val in todo_task.keyval.items()]
|
207
|
-
)
|
231
|
+
for todo_task in filtered_todo_list:
|
208
232
|
results.append(
|
209
|
-
|
210
|
-
|
211
|
-
completed,
|
212
|
-
priority,
|
213
|
-
completion_date,
|
214
|
-
creation_date,
|
215
|
-
description,
|
216
|
-
additions,
|
217
|
-
]
|
233
|
+
get_visual_todo_line(
|
234
|
+
terminal_width, max_desc_length, max_additional_info_length, todo_task
|
218
235
|
)
|
219
236
|
)
|
220
237
|
return "\n".join(results)
|
221
238
|
|
222
239
|
|
240
|
+
def get_visual_todo_header(
|
241
|
+
terminal_width: int, max_desc_length: int, max_additional_info_length: int
|
242
|
+
) -> str:
|
243
|
+
priority = "".ljust(3)
|
244
|
+
completed = "".ljust(3)
|
245
|
+
completed_at = "COMPLETED AT".rjust(14)
|
246
|
+
created_at = "CREATED_AT".ljust(14)
|
247
|
+
description = "DESCRIPTION".ljust(min(max_desc_length, 70))
|
248
|
+
additional_info = "PROJECT/CONTEXT/OTHERS"
|
249
|
+
if terminal_width <= 14 + max_desc_length + max_additional_info_length:
|
250
|
+
return " ".join([priority, completed, description])
|
251
|
+
if terminal_width <= 36 + max_desc_length + max_additional_info_length:
|
252
|
+
return " ".join([priority, completed, description, additional_info])
|
253
|
+
return " ".join(
|
254
|
+
[priority, completed, completed_at, created_at, description, additional_info]
|
255
|
+
)
|
256
|
+
|
257
|
+
|
258
|
+
def get_visual_todo_line(
|
259
|
+
terminal_width: int,
|
260
|
+
max_desc_length: int,
|
261
|
+
max_additional_info_length: int,
|
262
|
+
todo_task: TodoTaskModel,
|
263
|
+
) -> str:
|
264
|
+
completed = "[x]" if todo_task.completed else "[ ]"
|
265
|
+
priority = " " if todo_task.priority is None else f"({todo_task.priority})"
|
266
|
+
completed_at = stylize_yellow(_date_to_str(todo_task.completion_date))
|
267
|
+
created_at = stylize_cyan(_date_to_str(todo_task.creation_date))
|
268
|
+
description = todo_task.description.ljust(max_desc_length)
|
269
|
+
if len(description) > max_desc_length:
|
270
|
+
description = description[: max_desc_length - 4] + " ..."
|
271
|
+
description = description[:max_desc_length]
|
272
|
+
additional_info = ", ".join(
|
273
|
+
[stylize_yellow(f"+{project}") for project in todo_task.projects]
|
274
|
+
+ [stylize_cyan(f"@{context}") for context in todo_task.contexts]
|
275
|
+
+ [stylize_magenta(f"{key}:{val}") for key, val in todo_task.keyval.items()]
|
276
|
+
)
|
277
|
+
if terminal_width <= 14 + max_desc_length + max_additional_info_length:
|
278
|
+
return " ".join([priority, completed, description])
|
279
|
+
if terminal_width <= 36 + max_desc_length + max_additional_info_length:
|
280
|
+
return " ".join([priority, completed, description, additional_info])
|
281
|
+
return " ".join(
|
282
|
+
[priority, completed, completed_at, created_at, description, additional_info]
|
283
|
+
)
|
284
|
+
|
285
|
+
|
223
286
|
def _date_to_str(date: datetime.date | None) -> str:
|
224
287
|
if date is None:
|
225
288
|
return "".ljust(14)
|
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
|