QuickRouter · 本站原创输入 / 人工参考 · 目标代理未执行
VS Code Copilot Agent 教程:把单文件脚本打成可安装的命令行工具
textstats.before.py
import sys
text=open(sys.argv[1],encoding="utf-8").read()
print(len(text.splitlines()),len(text),len(text.split()))
pyproject.toml
[build-system]
requires = ["setuptools==80.9.0", "wheel==0.45.1"]
build-backend = "setuptools.build_meta"
[project]
name = "qr-textstats-fixture"
version = "0.1.0"
requires-python = ">=3.10"
description = "Original offline tutorial fixture; not for publication"
[project.scripts]
qr-textstats = "qr_textstats.cli:main"
[tool.setuptools.packages.find]
where = ["src"]