Skip to content

Commit

Permalink
docs: update user and dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
isHarryh committed Aug 1, 2024
1 parent 7fc133a commit e93f417
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@

-----

## v3.1
#### 新增
1. ★ 新增了可以通过命令行的方式直接启动程序并执行任务的功能。

#### 修复
1. ☆ 修复了解包音频文件时有概率因 `Fmoderror` 导致失败的问题。

#### 优化
1. 不再在任务完成后加入延迟等待。

#### 依赖
1. 将 UnityPy 升级到了 1.10.14。


## v3.0
#### 新增
1. ★ 新增了基于动态调度 Worker 实现的多线程文件写入的功能,提升了保存文件的速度。
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
2. 解包时可以将文件按源 AB 文件的名称分目录存放。
2. 批量合并 RGB 通道图和 Alpha 通道图。
3. 批量解码 FlatBuffers 数据文件。
4. 提供交互式命令行界面进行操作
4. 既提供交互式命令行界面进行操作,也支持直接通过命令行运行

#### 支持的类型
| Unity类型 | 描述 | 导出格式 |
Expand Down Expand Up @@ -68,7 +68,7 @@
- [RGB通道图和A通道图](docs/Essentials.md#rgb通道图和a通道图)
- [Spine动画小人](docs/Essentials.md#spine动画小人)

### 4.示例
### 4.示例用法
首先,将需要解包的文件夹(可以是多个)放到与 exe 相同的目录下,至此,我们的目录结构大致如下:
> **你的目录**
> ├─Android (解包整个目录需要很久)
Expand All @@ -94,6 +94,33 @@

此外,运行程序后,工作目录会生成配置文件 `ArkUnpackerConfig.json` 与日志文件 `ArkUnpackerLogs.log`。有关配置文件的字段说明,请参阅[此文档](docs/ConfigFile.md)了解详情。

### 5.命令行用法
除了上述示例用法展示的**交互式**命令行界面外,程序还支持**直接**通过命令行来运行,以便熟悉命令行调用的用户使用。相关参数如下:
```
usage: ArkUnpacker [-h] [-v] [-m {ab,cb,fb}] [-i INPUT] [-o OUTPUT] [-d] [--image] [--text] [--audio] [--spine] [-g] [-l {0,1,2,3,4}]
Arknights Assets Unpacker. Use no argument to run to enter the interactive CLI mode.
optional arguments:
-h, --help show this help message and exit
-v, --version show a version message and exit
-m {ab,cb,fb}, --mode {ab,cb,fb}
working mode, ab=resolve-ab, cb=combine-image, fb=decode-flatbuffers
-i INPUT, --input INPUT
source file or directory path
-o OUTPUT, --output OUTPUT
destination directory path
-d, -delete delete the existed destination directory first
--image in resolve ab mode: export image files
--text in resolve ab mode: export text or binary files
--audio in resolve ab mode: export audio files
--spine in resolve ab mode: export spine asset files
-g, --group in resolve ab mode: group files into separate directories named by their source ab file
-l {0,1,2,3,4}, --logging-level {0,1,2,3,4}
logging level, 0=none, 1=error, 2=warn, 3=info, 4=debug
```

运行 `ArkUnpacker -h` 命令可以显示此帮助信息。如果您使用的命令不带任何参数,那么程序会以交互式命令行界面的模式启动。

## 注意事项 <sub>Notice</sub>
1. 使用一键执行模式时,不会解包**直接**位于程序所在目录中的 AB 文件,只会解包子文件夹里的 AB 文件。
Expand Down
4 changes: 3 additions & 1 deletion docs/ForDevelopers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ArkUnpacker附加说明文档
2. **构建:** 在 VS Code 中启动 `Build Dist` 终端任务;或者直接运行 `Build.py` 脚本。这将使用 PyInstaller 在项目文件夹的 `build/dist` 目录中自动生成可分发的文件。

## 代码结构与用例
本程序通过交互式命令行界面(Interactive CLI)与用户进行交互。
本程序可以通过交互式命令行界面(Interactive CLI)与用户进行交互,也可以直接使用命令行运行并执行任务

本项目的代码可分为 3 个层次:
- 表现层(入口点 `Main.py`
Expand All @@ -46,3 +46,5 @@ CombineRGBwithA.main('Unpacked', 'Combined') # (b)
```

以上 (a) (b) 两个方法还有其他可选的参数,具体的用法已在函数声明的代码注释中非常详尽地给出了,请自行阅读。

关于直接使用命令行运行的详细介绍,请参阅 [README](../README.md#5命令行用法)

0 comments on commit e93f417

Please sign in to comment.