Add pack unpack examples

This commit is contained in:
Truman Kilen 2023-10-06 16:32:21 -05:00
parent f802eab828
commit d8e82a2d27
2 changed files with 27 additions and 2 deletions

View file

@ -13,7 +13,8 @@ Library and CLI tool for working with Unreal Engine .pak files.
- Unpacking is guarded against malicious pak that attempt to write to parent directories - Unpacking is guarded against malicious pak that attempt to write to parent directories
## cli ## cli
``` ```console
$ repak --help
Usage: repak [OPTIONS] <COMMAND> Usage: repak [OPTIONS] <COMMAND>
Commands: Commands:
@ -31,6 +32,30 @@ Options:
-V, --version Print version -V, --version Print version
``` ```
### packing
```console
$ find mod
mod
mod/assets
mod/assets/AssetA.uasset
mod/assets/AssetA.uexp
$ repak pack -v mod
packing assets/AssetA.uasset
packing assets/AssetA.uexp
Packed 4 files to mod.pak
$ repak list mod.pak
assets/AssetA.uasset
assets/AssetA.uexp
```
### unpacking
```console
$ repak --aes-key 0x12345678 unpack MyEncryptedGame.pak
Unpacked 12345 files to MyEncryptedGame from MyEncryptedGame.pak
```
## compatibility ## compatibility
| UE Version | Version | Version Feature | Read | Write | | UE Version | Version | Version Feature | Read | Write |

View file

@ -20,5 +20,5 @@ fn test_readme_help() {
let readme = std::fs::read_to_string(workspace_dir().join("README.md")).unwrap(); let readme = std::fs::read_to_string(workspace_dir().join("README.md")).unwrap();
assert!(readme.contains(&format!("```\n{help}```"))); assert!(readme.contains(&format!("```console\n$ repak --help\n{help}```")));
} }