A. 删除 3 个 .backup 文件(约 3.4K 行)
- douyin/detection/douyin_pixel.py.backup
- douyin/stage/douyin_stage_handler.py.backup
- gui/components/log_color_config.py.backup
B. 删除 0 字节文件
- douyin/other/douyin_stuck_guard.py
- docs/功能差异对比.md
- docs/archive/模块化代码对比说明.md
C. 删除 9 个 TODO + pass 占位组件(全仓零外部引用)
- gui/components/{config_manager,image_viewer,stats_display,
reservation_display,high_value_rooms_display,ocr_panel,main_window}.py
- gui/web_components/{proc_runner,http_handler}.py
D. 删除占位目录与失效测试入口
- douyin/detection/core/ 仅 re-export 占位
- douyin/fudai/finder/ 仅 re-export 占位
- tests/run_test.py 指向已删的 deleted_tests_backup/
附加:tools/diagnostics/check_web_gui_config_sync.py --help 字符串里
tools/web_gui_config_manifest.json 旧路径修正为 tools/dev/...
回归:154 → 141 个 .py,全量 compileall 通过;AST 扫描 0 处 import 残留;
gui.gui_app/web_gui/gui_core 仍可加载;fudai_analyse / should_skip_fudai_by_config
业务函数链路正常;test_filter_logging / check_web_gui_config_sync 通过。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
tools/ 工具脚本目录
按功能分组组织,与主代码分离。tools/ 不被业务代码 import。
目录结构
| 子目录 | 用途 | 典型脚本 |
|---|---|---|
diagnostics/ |
环境/配置/依赖诊断 | check_system_config.py、check_dependencies.py、diagnose_runtime_flags.py |
logs/ |
日志分析与查看 | analyze_step_times.py、color_log_viewer.py、log_filter.py |
coords/ |
坐标拾取与区域选择 | pick_coords.py、region_selector.py、scan_coords.py |
cleanup/ |
代码清理工具 | cleanup_unused_files.py、fix_trailing_whitespace.py |
adb/ |
ADB / 输入法相关 | auto_connect_wifi_adb.py、ADBKeyboard.apk |
windows/ |
Windows 系统修复脚本 | fix_start_menu_win11.ps1 等(与本项目无关,仅备份) |
dev/ |
开发辅助 / 运行时探测 | param_usage_tool.py、simulate_swipe_trigger.py、merge_configs.py |
常用入口
# 系统/依赖诊断
python tools/diagnostics/check_system_config.py
python tools/diagnostics/check_dependencies.py
# 坐标扫描
python tools/coords/scan_coords.py
# 日志分析
python tools/logs/log_filter.py
python tools/logs/color_log_viewer.py
# 参数使用追踪
python tools/dev/param_usage_tool.py show --limit 200
注意
windows/下的脚本是本机环境的修复工具,与抖音挂机功能无关,保留作为环境备份。coords/scan_coords.py输出tools/coords/coords_report.csv(已 gitignore),人工核查用。