diff --git a/pyproject.toml b/pyproject.toml index 5ba2759..67c6bd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,9 @@ dependencies = [ requires = ["hatchling"] build-backend = "hatchling.build" +[project.scripts] +tsl_tools = "tsl_tools:main" + [tool.uv] dev-dependencies = ["basedpyright>=1.18.4", "ruff>=0.6.1"] diff --git a/src/tsl_tools/__init__.py b/src/tsl_tools/__init__.py index 3decabe..b08de4e 100644 --- a/src/tsl_tools/__init__.py +++ b/src/tsl_tools/__init__.py @@ -222,4 +222,5 @@ def timer_callback() -> None: task.append(create_task(update_result(table, queue))) -ui.run(port=5555, show=False, dark=True, language='zh-CN', reload=False) +def main() -> None: + ui.run(port=5555, show=True, dark=True, language='zh-CN', reload=False) diff --git a/src/tsl_tools/__main__.py b/src/tsl_tools/__main__.py index e69de29..c7c70d0 100644 --- a/src/tsl_tools/__main__.py +++ b/src/tsl_tools/__main__.py @@ -0,0 +1,4 @@ +from . import main + +if __name__ == '__main__': + main()