6 个稳定版本
1.0.5 | 2023 年 5 月 31 日 |
---|---|
1.0.3 | 2023 年 5 月 30 日 |
#1003 在 命令行实用工具 中
66 每月下载量
1MB
138 代码行
包含 (ELF 可执行文件/库, 4.5MB) 主要
mtgadmin
一个 Rust 守护进程,用于监听 MTG Arena 工具的文件更改并自动提交日志
此项目的构建方式
以非特权用户身份安装 Rust 并重新加载 Cargo 环境。
$ cd /tmp
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rust.sh
$ vim rust.sh
$ chmod u+x rust.sh
$ ./rust.sh
$ source $HOME/.cargo/env
确认 Rust 版本,并确保您已更新到最新版本。
$ rustup self update
info: checking for self-update
rustup unchanged - 1.26.0
跟进 Rust Nightly 构建。
$ rustup default nightly
初始项目设置、构建和运行 mtgadmin
$ cargo new mtgadmin --bin
Created binary (application) `mtgadmin` package
$ cd mtgadmin/src
$ cargo build
rustc main.rs
测试
检查 crate 的 semver 版本
$ cargo install cargo-semver-checks --locked
$ cargo semver-checks check-release
运行 cargo-checkmate
cargo install cargo-checkmate
cargo checkmate
使用 mtgadmin 的硬性要求
为了充分利用 mtgadmin,以下是一些硬性要求!
- 您必须在 mtgatool.com 上拥有一个免费账户。
- 您必须安装 mtgatool Linux 客户端 [链接]。
- 您必须创建一个免费的 17lands 账户。
- 您必须安装 17lands Linux 客户端 [链接]。
mtgadmin 使用方法
将游戏数据上传到 17lands API。
sudo mtgadmin -m '/mnt/disk3/lutris/mtg_arena/drive_c/Program Files/Wizards of the Coast/MTGA/MTGA_Data/Logs/Logs' -a '17lands'
[1/4] 🚚 Getting MTG Arena Tool log directory to monitor from user...
Monitoring MTG Arena Tool log directory /mnt/disk3/lutris/mtg_arena/drive_c/Program Files/Wizards of the Coast/MTGA/MTGA_Data/Logs/Logs
[2/4] 📃 Getting API endpoint from user...!
API endpoint to upload game data to: 17lands
17lands is a supported API endpoint!
[3/4] ✨ Uploading MTGA game data to 17lands...!
Uploading MTGA game data to API endpoint 17lands
"/mnt/disk3/lutris/mtg_arena/drive_c/Program Files/Wizards of the Coast/MTGA/MTGA_Data/Logs/Logs/UTC_Log - 03-01-2023 22.33.07.log" appears to be an MTGA game log file
Debug info: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "", stderr: "20230530 154338,INFO,Saving logs to /home/vader/.seventeenlands/seventeenlands.log\n20230530 154339,INFO,Got minimum client version response: {\"is_supported\": true, \"latest_version\": \"0.1.34\", \"min_version\": \"0.1.37\", \"upgrade_instructions\": \"17Lands update required! The minimum supported version for the client is 0.1.37. Please update with one of the following commands in the terminal, depending on your installation method:\\nbrew update && brew upgrade seventeenlands\\npip3 install --user --upgrade seventeenlands\"}\n20230530 154339,INFO,Minimum supported version: [0, 1, 37]; this version: [0, 1, 39]\n20230530 154339,INFO,Using token 1f4a...7fa0\n20230530 154339,WARNING,Found no files to parse. Try to find Arena's Player.log file and pass it as an argument with -l\n20230530 154339,INFO,Exiting\n" })
Uploading MTGA game data to 17lands...
"/mnt/disk3/lutris/mtg_arena/drive_c/Program Files/Wizards of the Coast/MTGA/MTGA_Data/Logs/Logs/UTC_Log - 03-10-2023 22.03.06.log" appears to be an MTGA game log file
Debug info: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "", stderr: "20230530 154339,INFO,Saving logs to /home/vader/.seventeenlands/seventeenlands.log\n20230530 154339,INFO,Got minimum client version response: {\"is_supported\": true, \"latest_version\": \"0.1.34\", \"min_version\": \"0.1.37\", \"upgrade_instructions\": \"17Lands update required! The minimum supported version for the client is 0.1.37. Please update with one of the following commands in the terminal, depending on your installation method:\\nbrew update && brew upgrade seventeenlands\\npip3 install --user --upgrade seventeenlands\"}\n20230530 154339,INFO,Minimum supported version: [0, 1, 37]; this version: [0, 1, 39]\n20230530 154339,INFO,Using token 1f4a...7fa0\n20230530 154339,WARNING,Found no files to parse. Try to find Arena's Player.log file and pass it as an argument with -l\n20230530 154339,INFO,Exiting\n" })
Uploading MTGA game data to 17lands...
[4/4] 🚚 Demonizing mtgadmin...!
mtgadmin 的未来
- 改进对 17lands API 的支持。
- 添加对 MTGA 工具聚合器的上传支持 [链接]。
- 添加对 magicthegathering API 的支持。
所以请保持关注。我有很多计划!
依赖项
~48–82MB
~1.5M SLoC