mathgen-cli 1.0.0-rc1 → 1.0.0-rc2
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 +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
不需要注册、不需要联网、不需要服务器。
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
|
-
npx mathgen-cli@rc # 或写死版本:npx mathgen-cli@1.0.0-
|
|
7
|
+
npx mathgen-cli@rc # 或写死版本:npx mathgen-cli@1.0.0-rc2
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
> **当前是预发布版(release candidate
|
|
11
|
-
>
|
|
10
|
+
> **当前是预发布版(release candidate)**:npm 上 `rc` 与 `latest` 都指向 `1.0.0-rc2`,
|
|
11
|
+
> 所以 `@rc`、`@1.0.0-rc2` 与裸写 `npx mathgen-cli` 拿到的是同一份;要钉住版本就写死版本号。
|
|
12
12
|
>
|
|
13
13
|
> **包名为什么不是 `mathgen`?** npm 上那个名字被判定与已有的 `math-gen` 太像(去标点后同名),
|
|
14
14
|
> `npm publish` 直接 403。包名改成 `mathgen-cli`,但里面的命令仍然是 `mathgen`,
|
|
@@ -27,11 +27,11 @@ npx mathgen-cli@rc # 或写死版本:npx mathgen-cli@1.0.0-rc1
|
|
|
27
27
|
## 用法
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
npx mathgen-cli@
|
|
31
|
-
npx mathgen-cli@
|
|
32
|
-
npx mathgen-cli@
|
|
33
|
-
npx mathgen-cli@
|
|
34
|
-
npx mathgen-cli@
|
|
30
|
+
npx mathgen-cli@rc # 默认 127.0.0.1:8000,自动打开浏览器
|
|
31
|
+
npx mathgen-cli@rc --port 9000 # 换端口
|
|
32
|
+
npx mathgen-cli@rc --host 0.0.0.0 # 让同一局域网的学生也能连(教室场景)
|
|
33
|
+
npx mathgen-cli@rc --data-dir D:\math # 数据目录
|
|
34
|
+
npx mathgen-cli@rc --no-browser # 不要自动开浏览器
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
参数会**原样转交**给 `mathgen` 命令,完整列表:
|
|
@@ -60,21 +60,21 @@ npx mathgen-cli@1.0.0-rc1 --no-browser # 不要自动开浏览器
|
|
|
60
60
|
|
|
61
61
|
## 常见问题
|
|
62
62
|
|
|
63
|
-
**PDF 导出报 503?** Chromium 没装好。`npx mathgen-cli` 首次会自己装;
|
|
63
|
+
**PDF 导出报 503?** Chromium 没装好。`npx mathgen-cli@rc` 首次会自己装;
|
|
64
64
|
如果当时网络不通,手动补一次:
|
|
65
65
|
|
|
66
66
|
```sh
|
|
67
67
|
# 用启动器建出来的那个环境
|
|
68
|
-
~/.mathgen/npm-1.0.0-
|
|
68
|
+
~/.mathgen/npm-1.0.0-rc2/venv/bin/python -m playwright install chromium
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
(Windows 上是 `%USERPROFILE%\.mathgen\npm-1.0.0-
|
|
71
|
+
(Windows 上是 `%USERPROFILE%\.mathgen\npm-1.0.0-rc2\venv\Scripts\python.exe`)
|
|
72
72
|
|
|
73
73
|
**下载 wheel 失败?** 可以指定别的下载地址或本地文件:
|
|
74
74
|
|
|
75
75
|
```sh
|
|
76
|
-
MATHGEN_WHEEL_URL=https://你的镜像/mathgen_backend-1.0.
|
|
77
|
-
MATHGEN_WHEEL_PATH=D:\build\mathgen_backend-1.0.
|
|
76
|
+
MATHGEN_WHEEL_URL=https://你的镜像/mathgen_backend-1.0.0rc2-py3-none-any.whl npx mathgen-cli@rc
|
|
77
|
+
MATHGEN_WHEEL_PATH=D:\build\mathgen_backend-1.0.0rc2-py3-none-any.whl npx mathgen-cli@rc
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
**想彻底卸载?** 删掉 `~/.mathgen` 即可。
|