docs: 完善安装脚本说明与错误处理文档
This commit is contained in:
25
README.md
25
README.md
@@ -44,19 +44,21 @@
|
||||
|
||||
> 如果 Windows 提示“Windows 已保护你的电脑”,请点击“更多信息” → “仍要运行”。
|
||||
|
||||
#### 方法 B:右键在 PowerShell 中运行
|
||||
#### 方法 B:右键在终端中运行
|
||||
|
||||
如果双击运行被系统拦截,可以按以下步骤:
|
||||
|
||||
1. 打开解压后的 `pptopic` 文件夹
|
||||
2. 在文件夹**空白处**按住 `Shift` 键,同时点击**鼠标右键**
|
||||
3. 选择“在此处打开 PowerShell 窗口”(Windows 11 可能显示为“在终端中打开”)
|
||||
4. 在弹出的蓝色窗口中输入以下命令,然后按回车:
|
||||
4. 在弹出的窗口中输入以下命令,然后按回车:
|
||||
|
||||
```powershell
|
||||
.\setup.bat
|
||||
```
|
||||
|
||||
> 打开的终端可能是 PowerShell(蓝色窗口)或命令提示符 cmd(黑色窗口),两种情况下 `.\setup.bat` 都能正常运行。如果是 cmd,也可以省略前面的 `.\` 直接输入 `setup.bat`。
|
||||
|
||||
等待安装完成即可。
|
||||
|
||||
#### 安装完成后
|
||||
@@ -71,9 +73,15 @@ uv 0.11.20
|
||||
2.17.0
|
||||
|
||||
--- pptopic 版本 ---
|
||||
pptopic 0.3.2
|
||||
pptopic version: 0.3.2
|
||||
Under the MIT License.
|
||||
|
||||
--- PowerPoint 检测 ---
|
||||
PowerPoint 已安装(检测到 PowerPoint.Application 注册项)。
|
||||
```
|
||||
|
||||
> 如果你没有安装 PowerPoint,最后一行会显示警告,提示你先安装 PowerPoint,否则 `pptopic export` 命令无法运行。
|
||||
|
||||
然后你可以直接在当前窗口使用 pptopic:
|
||||
|
||||
```powershell
|
||||
@@ -254,11 +262,12 @@ pptopic optimize image.png
|
||||
pptopic optimize --help
|
||||
```
|
||||
|
||||
## 图片优化
|
||||
## 图片优化引擎
|
||||
|
||||
为了获得最佳的图片压缩效果,推荐使用 [pngquant](https://pngquant.org/) 进行图片压缩。
|
||||
当然也可以使用其他图片压缩工具,如 [libvips](https://www.libvips.org/) 等,不过需要自己设置引擎的优化参数。
|
||||
|
||||
### 安装脚本
|
||||
### PngQuant安装脚本
|
||||
|
||||
可以使用提供的 PowerShell 脚本安装 pngquant:
|
||||
|
||||
@@ -321,6 +330,12 @@ powershell -ExecutionPolicy Bypass -File .\setup.ps1 -SkipPngquant
|
||||
|
||||
但强烈建议安装,否则导出的长图文件会比较大。
|
||||
|
||||
### 安装时报“未检测到 PowerPoint”
|
||||
|
||||
安装脚本会在最后一步检测 PowerPoint 是否安装。如果看到这个警告,说明系统里没有 PowerPoint,`pptopic export` 命令将无法运行(它需要通过 PowerPoint 导出幻灯片)。
|
||||
|
||||
请安装 Microsoft PowerPoint(Office 2016 或更新版本)后重试。PowerPoint 不在一键安装脚本的自动安装范围内,需要自行安装。
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
|
||||
Reference in New Issue
Block a user