#report #health #daily #sdk #process #cli #xmu

bin+lib xmu-health-report-rust-sdk

A CLI / SDK intending to simplify XMU Daily Health Report process

8 releases

0.1.8 Oct 18, 2022
0.1.7 Apr 3, 2022
0.1.6 Mar 25, 2022
0.1.5 Oct 18, 2021

#26 in #daily

29 downloads per month

MIT license

39KB
826 lines

XMU Daily Health Report - Rust CLI & SDK

旧版 auto-daily-health-report,点这里

原作者(@kirainmoe)已毕业,本仓库将接手维护。

一个完成 厦门大学·每日健康打卡 (Daily Health Report) 的命令行工具和 Rust 语言 SDK.

使用方法

Daily Health Report 需要 Rust + Cargo 环境。请参照 Rust 官网入门教程 安装 Rust 环境。

如果你在下载过程中遇到问题,请考虑更换 RsProxy 源.

另外,您也可以前往 Release界面 下载预编译好的二进制文件。但更推荐您使用 Rust + Cargo 自行构建。

作为命令行工具 (CLI) 使用

安装 CLI:(如果您是直接下载的预编译二进制文件,请跳过该步骤)

$ cargo install xmu-health-report-rust-sdk

使用:

$ xmu-health-report-rust-sdk

XMU Daily Health Report Rust CLI - 厦门大学每日健康打卡工具 1.0

USAGE:
    xmu-health-report-rust-sdk [SUBCOMMAND]

FLAGS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    help        Print this message or the help of the given subcommand(s)
    pipeline    Start a health report pipeline - 启动健康打卡流程
    query       Query today's health report status - 查询今日打卡状态
    report      Make health report request - 发送健康打卡请求

作为项目依赖使用

Cargo.toml 中添加:

[depenencies]
xmu-health-report-rust-sdk = "0.1.7"

另请参考 docs.rs 中 crate 的接口定义。

Why Rust?

虽然用 Rust 来写这种东西很折磨,对新手也很不友好。使用 Rust 重写这个项目的耗时,足以让我用 C++ 重新写两遍。

但根据过去半年的数据表明,Rust 版本的鲁棒性相比 Python 版本提升了 N 个档次,只要不是逻辑改动的问题,Rust 版本都能正常处理 —— 至少它在我的服务器上达到了 100% SLA.

License

MIT

Dependencies

~23–38MB
~433K SLoC