1个稳定版本
1.0.0 | 2023年10月28日 |
---|
#1054 in 解析实现
39KB
769 代码行
factorio-settings
一个命令行实用工具,用于解码和编码Factorio的mod设置(mod-settings.dat
)
功能
- 易于使用的命令行界面
- 与Factorio的字节对齐(目前表现良好)
- 解码表示形式可用格式:JSON,TOML
快速示例
factorio-settings mod-settings.dat -f json | jq '.startup["my-color-setting"].value.g=1' | factorio-settings -f json - mod-settings.dat
factorio-settings mod-settings.dat json_settings.json
factorio-settings mod-settings.dat toml_settings.toml
用法
Usage: factorio-settings [OPTIONS] <INPUT> [OUTPUT]
Arguments:
<INPUT> The input path to read binary settings from. Use "-" for stdin
[OUTPUT] The output file. Overwrites if present. Stdout if omitted
Options:
-m, --mode <MODE> Whether to encode or decode the input. If not provided, will attempt to infer based on output type, or input type, in that order [possible values: decode, encode]
-f, --format <FORMAT> The format for the serialized input/output. If omitted, will attempt to infer based on mode and input or output [possible values: toml, json]
-h, --help Print help
-V, --version Print version
依赖项
~2.7–4MB
~71K SLoC