dsh-chaoxing-assistant 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/client.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,6 +41,17 @@ target=https://github.com/weichen704/dsh-chaoxing-assistant/releases/latest/down
|
|
|
41
41
|
|
|
42
42
|
> 不要用 `github:weichen704/dsh-chaoxing-assistant`:它需要本机装 git,且解析的是 main 分支 HEAD,不保证是最新发布版。
|
|
43
43
|
|
|
44
|
+
**首次做章节测验要联网一次**:字体解码和验证码识别要 `ddddocr` + `rapidocr_onnxruntime`(约 150MB),DSH 自带的 Python 里没有。插件第一次真要用到时,会在 `~/.dsh-chaoxing/py` 自动建独立 venv、从清华/阿里镜像装好(只装一次,不碰系统 Python),面板显示进度;装好之后识别离线可用。想自己管就设 `pythonDeps.autoInstall: false`,装好后用 `/chaoxing doctor` 自检。
|
|
45
|
+
|
|
46
|
+
**升级注意(装过旧版一定要看)**:直接重跑同一个 `releases/latest/download/...` 地址,pnpm 会按 URL 缓存回一句 `Already up to date`(实测:2.3.5 装完再装还是 2.3.5),版本根本不升。请改用带版本号的来源:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
action=install_bundle
|
|
50
|
+
target=https://github.com/weichen704/dsh-chaoxing-assistant/releases/download/v2.3.8/dsh-chaoxing-assistant.tgz
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
或按版本号走 npm:`dsh plugin --profile <profile 名> add -w dsh-chaoxing-assistant@2.3.8`;也可以先删掉 profile 里的 `node_modules/dsh-chaoxing-assistant` 再重装。装完完整重启 DSH,面板页脚会显示版本号(`v2.3.8`)。
|
|
54
|
+
|
|
44
55
|
**方式四:本地目录**
|
|
45
56
|
把仓库下载/解压到固定位置(之后不能删或移动,link 安装指向它),然后在 **设置 → 插件 → 添加插件** 里选这个目录。
|
|
46
57
|
|
|
@@ -52,7 +63,7 @@ target=https://github.com/weichen704/dsh-chaoxing-assistant/releases/latest/down
|
|
|
52
63
|
| --- | --- |
|
|
53
64
|
| Windows | 面板的桌面模式依赖 Windows UIA + 系统 OCR;网页模式同理依赖本机 Edge |
|
|
54
65
|
| Microsoft Edge | 插件用真实 Edge,通过远程调试端口(默认 `9422`)驱动,不装浏览器驱动 |
|
|
55
|
-
| Python 3 + OCR 依赖 | 验证码 OCR(`python/captcha.py`)与反爬字体解码(`python/fontmap.py
|
|
66
|
+
| Python 3 + OCR 依赖 | 验证码 OCR(`python/captcha.py`)与反爬字体解码(`python/fontmap.py`)用。字体解码要 `rapidocr_onnxruntime`、验证码要 `ddddocr`(连带 `numpy`、`Pillow`,合计约 150MB),**DSH 自带的 Python 里没有**:首次真正用到时插件自动在 `~/.dsh-chaoxing/py` 建 venv 装好(一次,需联网,之后离线可用);`pythonDeps.autoInstall: false` 可关,`CHAOXING_PYTHON` 可指定解释器。没装好时字体解不开,测验整卷跳过(`quiz-font-abort`),不会交乱码卷;`/chaoxing doctor` 自检 |
|
|
56
67
|
| 端口 `9483` | 面板与宿主之间的本地 HTTP 桥,只监听 `127.0.0.1` |
|
|
57
68
|
|
|
58
69
|
## 快速开始
|
|
@@ -151,6 +162,17 @@ target=https://github.com/weichen704/dsh-chaoxing-assistant/releases/latest/down
|
|
|
151
162
|
|
|
152
163
|
## 更新日志
|
|
153
164
|
|
|
165
|
+
### v2.3.8(文档:把「升级」和「首次要联网」写进安装步骤)
|
|
166
|
+
|
|
167
|
+
- 2.3.7 只改了开发用 README(`dsh-chaoxing/README.md`),而发给用户的公开 README 是人工维护、发布时不被覆盖的(`prepare-public.mjs` 的 KEEP 列表),于是包内安装说明还是旧的。本次把两条前置条件补进公开 README 的安装步骤和运行环境表。
|
|
168
|
+
- 升级请用带版本号地址,或 `dsh ... add -w dsh-chaoxing-assistant@2.3.8`:同一个 permalink 会被 pnpm 按 URL 缓存,重跑只会回 `Already up to date`。
|
|
169
|
+
|
|
170
|
+
### v2.3.6(修:别人电脑做不了章节测验——OCR 依赖按需自动安装 + doctor 自检)
|
|
171
|
+
|
|
172
|
+
- 起因:包内只有 `python/*.py` 脚本,`ddddocr` / `rapidocr_onnxruntime` / `onnxruntime`(约 150MB)不在 DSH 自带 Python 里;开发机能用是手工加了 `.pth` 指向开发机 venv,换台机器就 `ModuleNotFoundError`,表现为章节测验整卷跳过、9010 验证码识别失败(刷视频/文档不受影响)。
|
|
173
|
+
- 现在:首次真要用 OCR 时自动在 `~/.dsh-chaoxing/py` 建 `--system-site-packages` venv,pip 走清华→阿里→官方源回退,只装一次;面板橙色 chip 显示「OCR 依赖缺失 · 点击安装」或安装百分比;`/chaoxing doctor` 打印解释器路径、三包 import 结果、字体缓存张数、最近一次解码失败原因。
|
|
174
|
+
- 自测:移走 `.pth` 模拟干净电脑 → 自动装 39.5 秒 → 79/79 个反爬字符全部解对。
|
|
175
|
+
|
|
154
176
|
### v2.3.3(修复:章节测验「假提交」、逐字乱码,字体解不开就不交卷)
|
|
155
177
|
|
|
156
178
|
- **起因**:另一台机器的日志里章节测验连续 12 次 `ok:true`,真正的 `submitted` 一次都没有,面板却记了 12 份「已完成」;同期 `fonts` 目录 39 个 `.ttf`、0 个 `.json`,题干逐字乱码,模型只能给出 0.2~0.35 的置信度。
|
package/client.js
CHANGED
|
@@ -10,7 +10,7 @@ window.__ModuleLoader__.load({
|
|
|
10
10
|
const useRef = React.useRef;
|
|
11
11
|
const useMemo = React.useMemo;
|
|
12
12
|
const DEF_ID = 'dsh-chaoxing-assistant';
|
|
13
|
-
const VERSION = '2.3.
|
|
13
|
+
const VERSION = '2.3.8';
|
|
14
14
|
const UI_PORT = 9483;
|
|
15
15
|
// 两条传输:优先 DSH 同源路由(dsh-app://app 下无 CORS/无额外端口),失败再退到本机独立端口。
|
|
16
16
|
// v2.2.1 只写死了 http://127.0.0.1:9483,桌面端 Origin 是 dsh-app://app,被桥 403 掉 → 永远「未连接」。
|