docs: 切换 GUI 选型为 PySide6

This commit is contained in:
chengma
2026-06-26 16:09:09 +08:00
parent ccb4d52d9f
commit 92735ae7a4
11 changed files with 90 additions and 34 deletions
+6 -5
View File
@@ -7,14 +7,14 @@
- 日期:2026-06-26
- 阶段:V0 单账号 CDP 流程已验证;V1 多账号管理 + 5 Tab GUI + Excel/AI 流水线为既定设计,尚未开始编码。
- 技术栈:Python 3.10+,自研 CDP(websocket-client + requests),SQLite(sqlite3)+ `config.json` + openpyxl + AI(服务商待定),GUI Tkinter 5 Tab(待最终确认)。
- 生产代码:尚无 `appconfig/db/excel/config/chrome/editor/gui`;现有为验证脚本 + `cdp.py`。
- 技术栈:Python 3.10+,自研 CDP(websocket-client + requests),SQLite(sqlite3)+ `config.json` + openpyxl + AI(服务商待定),GUI PySide6 5 Tab(已定)。
- 生产代码:尚无 `appconfig/db/excel/config/chrome/editor/gui/workers`;现有为验证脚本 + `cdp.py`。
- 测试:以 `py_compile` + 在测试商品上手动跑 `prototypes/demo.py` 为主,无自动化测试。
- 数据:无 `config.json`、`cmshopee.db`、`chrome_user_data_dir/`(待 Phase 0/1 建立)。
## 既定设计要点(文档已定)
- GUI:**5 Tab 流水线**,顺序 ① 导入采集 → ② AI生成 → ③ 更新shopee → ④ 账号管理 → ⑤ 设置。
- GUI:**PySide6 5 Tab 流水线**,顺序 ① 导入采集 → ② AI生成 → ③ 更新shopee → ④ 账号管理 → ⑤ 设置;后台任务用 worker/QThread/signal。
- 流水线阶段:imported → collected(采集旧标题/旧封面+下载+回写)→ generated(AI 提示词生成新标题/新封面)→ applied(③ 弹窗批量确认后改 Shopee 并提交)。**无 confirmed、无常驻提交开关。**
- 存储:`config.json`(应用设置)+ `config/ai_models.json`(AI 模型清单与加密 Key)+ SQLite `cmshopee.db`(账号/任务/各阶段结果)+ openpyxl(Excel)+ 本地 `images/`(旧/新封面)。
- 多账号隔离:每账号独立 user-data-dir(非 profile)。
@@ -31,7 +31,7 @@
| `cdp.py` | 已有 | CDP 底座:连接/找 tab/开 tab/执行 JS/拖拽(正式模块,留根目录) |
| `prototypes/` | 已有 | 已验证原型/探查脚本(demo/set_title/set_cover/get_title/cookies/inspect_images/grab/1.py),逻辑待并入 `editor.py` 后清理;见 `prototypes/README.md` |
| `chrome-remote-debug-lan.md` | 已有 | WSL→Windows CDP 转发排查记录 |
| `appconfig.py` / `db.py` / `excel.py` / `config.py` / `chrome.py` / `editor.py` / `gui.py` | 待建 | Phase 0-3 产出 |
| `appconfig.py` / `db.py` / `excel.py` / `config.py` / `chrome.py` / `editor.py` / `gui.py` / `workers.py` | 待建 | Phase 0-3 产出 |
| `config.json` / `cmshopee.db` / `chrome_user_data_dir/` | 待建 | 含配置/业务/凭证,须 gitignore |
## 已验证能力(单账号)
@@ -68,6 +68,7 @@ set UPDATE=1 && python prototypes/demo.py
- Chrome 已用某 user-data-dir 带 `--remote-debugging-port` + `--remote-allow-origins=*` 启动并登录 Shopee。
- 已 `pip install websocket-client requests`。
- PySide6 当前环境已可导入(验证版本 6.5.3);GUI 实现固定使用 PySide6。
- 默认连 `127.0.0.1:9222`(开发期可用 `CDP_HOST` 指向 WSL 转发的 `192.168.0.224:9333`)。
## 开始编码前检查
@@ -80,6 +81,6 @@ set UPDATE=1 && python prototypes/demo.py
## 维护规则
- 新建 `config/chrome/editor/gui` 或改 CDP 选择器后,更新本文与 `04-architecture.md`。
- 新建 `config/chrome/editor/gui/workers` 或改 CDP 选择器后,更新本文与 `04-architecture.md`。
- 任务状态变化同步 [`06-tasks.md`](06-tasks.md);执行记录追加 [`../progress.md`](../progress.md)。
- 本文只保留当前快照,不保留完整历史。