Skip to content

Commit

Permalink
✨ 添加脚本入口
Browse files Browse the repository at this point in the history
  • Loading branch information
shoucandanghehe committed Oct 10, 2024
1 parent a156c82 commit d7b2254
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
3 changes: 2 additions & 1 deletion src/tsl_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 4 additions & 0 deletions src/tsl_tools/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import main

if __name__ == '__main__':
main()

0 comments on commit d7b2254

Please sign in to comment.