diff --git a/Cargo.lock b/Cargo.lock index 4042028..f791458 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -849,14 +849,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "punchlog-cli" -version = "0.1.0" -dependencies = [ - "chrono", - "punchlog", -] - [[package]] name = "quinn" version = "0.11.12" diff --git a/Cargo.toml b/Cargo.toml index b413aaf..e70bc54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,18 @@ -[workspace] -resolver = "2" -members = ["crates/punchlog", "crates/punchlog-cli"] -default-members = ["crates/punchlog-cli"] +[package] +name = "punchlog" +version = "0.1.0" +edition = "2021" +description = "iCenter 打卡登录、记录拉取与缺卡统计" +publish = false + +[dependencies] +aes-gcm = "0.10" +base64 = "0.22" +chrono = "0.4" +rand = "0.8" +reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] } +rsa = { version = "0.9", features = ["sha2", "pem"] } +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", features = ["preserve_order"] } +sha2 = "0.10" +thiserror = "2" diff --git a/README.md b/README.md index 13f53a4..8a55770 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PunchLog -个人打卡记录。核心逻辑在 `crates/punchlog`,命令行只负责打印最近一周。 +个人打卡记录。核心逻辑在 `src` 库里,`src/main.rs` 只负责打印最近一周。 ```powershell cargo run diff --git a/crates/punchlog-cli/Cargo.toml b/crates/punchlog-cli/Cargo.toml deleted file mode 100644 index e87cfb4..0000000 --- a/crates/punchlog-cli/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "punchlog-cli" -version = "0.1.0" -edition = "2021" -description = "输出最近一周打卡记录" -publish = false - -[[bin]] -name = "punchlog" -path = "src/main.rs" - -[dependencies] -chrono = "0.4" -punchlog = { path = "../punchlog" } diff --git a/crates/punchlog/Cargo.toml b/crates/punchlog/Cargo.toml deleted file mode 100644 index e70bc54..0000000 --- a/crates/punchlog/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "punchlog" -version = "0.1.0" -edition = "2021" -description = "iCenter 打卡登录、记录拉取与缺卡统计" -publish = false - -[dependencies] -aes-gcm = "0.10" -base64 = "0.22" -chrono = "0.4" -rand = "0.8" -reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] } -rsa = { version = "0.9", features = ["sha2", "pem"] } -serde = { version = "1", features = ["derive"] } -serde_json = { version = "1", features = ["preserve_order"] } -sha2 = "0.10" -thiserror = "2" diff --git a/crates/punchlog/src/analyze.rs b/src/analyze.rs similarity index 100% rename from crates/punchlog/src/analyze.rs rename to src/analyze.rs diff --git a/crates/punchlog/src/auth.rs b/src/auth.rs similarity index 100% rename from crates/punchlog/src/auth.rs rename to src/auth.rs diff --git a/crates/punchlog/src/config.rs b/src/config.rs similarity index 100% rename from crates/punchlog/src/config.rs rename to src/config.rs diff --git a/crates/punchlog/src/error.rs b/src/error.rs similarity index 100% rename from crates/punchlog/src/error.rs rename to src/error.rs diff --git a/crates/punchlog/src/iepms.rs b/src/iepms.rs similarity index 100% rename from crates/punchlog/src/iepms.rs rename to src/iepms.rs diff --git a/crates/punchlog/src/lib.rs b/src/lib.rs similarity index 100% rename from crates/punchlog/src/lib.rs rename to src/lib.rs diff --git a/crates/punchlog-cli/src/main.rs b/src/main.rs similarity index 100% rename from crates/punchlog-cli/src/main.rs rename to src/main.rs diff --git a/crates/punchlog/src/msa.rs b/src/msa.rs similarity index 100% rename from crates/punchlog/src/msa.rs rename to src/msa.rs diff --git a/crates/punchlog/src/record.rs b/src/record.rs similarity index 100% rename from crates/punchlog/src/record.rs rename to src/record.rs diff --git a/crates/punchlog/src/report.rs b/src/report.rs similarity index 100% rename from crates/punchlog/src/report.rs rename to src/report.rs