diff --git a/.github/workflows/modification.yml b/.github/workflows/modification.yml
new file mode 100644
index 00000000..2e2f38d9
--- /dev/null
+++ b/.github/workflows/modification.yml
@@ -0,0 +1,71 @@
+name: Branch modification
+
+on:
+ push:
+ branches:
+ - modification
+ workflow_dispatch:
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ build:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # For $commitCount
+ lfs: true
+
+ - uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Extract git-rev
+ run: |
+ $commitCount = git rev-list --count HEAD
+ $shortHash = git rev-parse --short HEAD
+ "GIT_REV=r$commitCount.$shortHash" | Out-File -FilePath $env:GITHUB_ENV -Append
+
+ - name: Setup Toolchain
+ run: rustup default nightly-msvc
+
+ - name: Set version in Cargo.toml
+ run: |
+ $files = @(
+ './Cargo.toml'
+ './yas/Cargo.toml'
+ './yas-genshin/Cargo.toml'
+ './yas-starrail/Cargo.toml'
+ )
+ [regex]$pattern = '(?<=version = ").*(?=")'
+ foreach ($file in $files) {
+ $pattern.Replace((Get-Content -Raw $file), "0.0.0-$env:GIT_REV", 1) | Out-File -FilePath $file
+ }
+
+ - name: Build (Release)
+ run: cargo build --release
+
+ - name: Rename Outputs
+ run: |
+ Move-Item ./target/release/yas_scanner_genshin.exe "yas_scanner_genshin_$env:GIT_REV.exe"
+ Move-Item ./target/release/yas_scanner_starrail.exe "yas_scanner_starrail_$env:GIT_REV.exe"
+
+ - name: Upload yas_scanner_genshin
+ uses: actions/upload-artifact@v4
+ with:
+ name: yas_scanner_genshin_${{ env.GIT_REV }}
+ path: yas_scanner_genshin_${{ env.GIT_REV }}.exe
+
+ - name: Upload yas_scanner_starrail
+ uses: actions/upload-artifact@v4
+ with:
+ name: yas_scanner_starrail_${{ env.GIT_REV }}
+ path: yas_scanner_starrail_${{ env.GIT_REV }}.exe
diff --git a/.gitignore b/.gitignore
index 864c4920..736b9722 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,10 @@
-/target
-*.png
-data/
target/
-mona.json
-.idea/
captures/
-.vscode/
\ No newline at end of file
+dumps/
+.vscode/
+.idea/
+/*.json
+**/*.png
+**tmp**
+**/.DS_Store
+data/
diff --git a/Cargo.lock b/Cargo.lock
index 23cb0e9e..089789b4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,6 +2,15 @@
# It is not intended for manual editing.
version = 3
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
[[package]]
name = "adler"
version = "1.0.2"
@@ -9,43 +18,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
-name = "adler32"
-version = "1.2.0"
+name = "ahash"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
[[package]]
name = "aho-corasick"
-version = "0.7.20"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
+checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783"
dependencies = [
"memchr",
]
[[package]]
-name = "android_system_properties"
-version = "0.1.5"
+name = "anstream"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c"
dependencies = [
- "libc",
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "utf8parse",
]
[[package]]
-name = "ansi_term"
-version = "0.12.1"
+name = "anstyle"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
- "winapi",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.48.0",
]
[[package]]
name = "anyhow"
-version = "1.0.70"
+version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]]
name = "anymap2"
@@ -53,28 +98,32 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c"
-[[package]]
-name = "atty"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
-dependencies = [
- "hermit-abi 0.1.19",
- "libc",
- "winapi",
-]
-
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+[[package]]
+name = "backtrace"
+version = "0.3.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+]
+
[[package]]
name = "base64"
-version = "0.13.1"
+version = "0.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
+checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53"
[[package]]
name = "bit-set"
@@ -91,12 +140,24 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+[[package]]
+name = "bitflags"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
+
[[package]]
name = "block"
version = "0.1.6"
@@ -105,24 +166,24 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "block-buffer"
-version = "0.10.3"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "bumpalo"
-version = "3.11.1"
+version = "3.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
+checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
[[package]]
name = "bytemuck"
-version = "1.12.3"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f"
+checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
[[package]]
name = "byteorder"
@@ -132,15 +193,27 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+
+[[package]]
+name = "bytesize"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"
+checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc"
+dependencies = [
+ "serde",
+]
[[package]]
name = "cc"
-version = "1.0.78"
+version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
[[package]]
name = "cfg-if"
@@ -149,47 +222,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "chrono"
-version = "0.4.23"
+name = "clap"
+version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
+checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6"
dependencies = [
- "iana-time-zone",
- "js-sys",
- "num-integer",
- "num-traits",
- "time",
- "wasm-bindgen",
- "winapi",
+ "clap_builder",
+ "clap_derive",
]
[[package]]
-name = "clap"
-version = "2.34.0"
+name = "clap_builder"
+version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08"
dependencies = [
- "ansi_term",
- "atty",
- "bitflags",
+ "anstream",
+ "anstyle",
+ "clap_lex",
"strsim",
- "textwrap",
- "unicode-width",
- "vec_map",
]
+[[package]]
+name = "clap_derive"
+version = "4.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
+
[[package]]
name = "cocoa"
-version = "0.24.1"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a"
+checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"block",
"cocoa-foundation",
- "core-foundation 0.9.3",
- "core-graphics 0.22.3",
- "foreign-types",
+ "core-foundation",
+ "core-graphics 0.23.1",
+ "foreign-types 0.5.0",
"libc",
"objc",
]
@@ -200,25 +283,15 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"block",
- "core-foundation 0.9.3",
+ "core-foundation",
"core-graphics-types",
- "foreign-types",
+ "foreign-types 0.3.2",
"libc",
"objc",
]
-[[package]]
-name = "codespan-reporting"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
-dependencies = [
- "termcolor",
- "unicode-width",
-]
-
[[package]]
name = "color_quant"
version = "1.1.0"
@@ -226,13 +299,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
-name = "core-foundation"
-version = "0.6.4"
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
+name = "console"
+version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
+checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
dependencies = [
- "core-foundation-sys 0.6.2",
+ "encode_unicode 0.3.6",
+ "lazy_static",
"libc",
+ "unicode-width",
+ "windows-sys 0.45.0",
]
[[package]]
@@ -241,64 +323,58 @@ version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146"
dependencies = [
- "core-foundation-sys 0.8.3",
+ "core-foundation-sys",
"libc",
]
[[package]]
name = "core-foundation-sys"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
-
-[[package]]
-name = "core-foundation-sys"
-version = "0.8.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
+checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]]
name = "core-graphics"
-version = "0.18.0"
+version = "0.22.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f15b3cb55687886a6b66953123621e5a1529a91a01666d646fb64baa13f900f0"
+checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb"
dependencies = [
- "bitflags",
- "core-foundation 0.6.4",
- "foreign-types",
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-graphics-types",
+ "foreign-types 0.3.2",
"libc",
]
[[package]]
name = "core-graphics"
-version = "0.22.3"
+version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb"
+checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212"
dependencies = [
- "bitflags",
- "core-foundation 0.9.3",
+ "bitflags 1.3.2",
+ "core-foundation",
"core-graphics-types",
- "foreign-types",
+ "foreign-types 0.5.0",
"libc",
]
[[package]]
name = "core-graphics-types"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
+checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33"
dependencies = [
- "bitflags",
- "core-foundation 0.9.3",
- "foreign-types",
+ "bitflags 1.3.2",
+ "core-foundation",
"libc",
]
[[package]]
name = "cpufeatures"
-version = "0.2.5"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
+checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1"
dependencies = [
"libc",
]
@@ -312,21 +388,11 @@ dependencies = [
"cfg-if",
]
-[[package]]
-name = "crossbeam-channel"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
-dependencies = [
- "cfg-if",
- "crossbeam-utils",
-]
-
[[package]]
name = "crossbeam-deque"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
dependencies = [
"cfg-if",
"crossbeam-epoch",
@@ -335,26 +401,32 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.13"
+version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
+checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
dependencies = [
"autocfg",
"cfg-if",
"crossbeam-utils",
- "memoffset",
+ "memoffset 0.9.0",
"scopeguard",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.14"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
dependencies = [
"cfg-if",
]
+[[package]]
+name = "crunchy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+
[[package]]
name = "crypto-common"
version = "0.1.6"
@@ -366,47 +438,24 @@ dependencies = [
]
[[package]]
-name = "cxx"
-version = "1.0.86"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579"
-dependencies = [
- "cc",
- "cxxbridge-flags",
- "cxxbridge-macro",
- "link-cplusplus",
-]
-
-[[package]]
-name = "cxx-build"
-version = "1.0.86"
+name = "csv"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70"
+checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
dependencies = [
- "cc",
- "codespan-reporting",
- "once_cell",
- "proc-macro2",
- "quote",
- "scratch",
- "syn",
+ "csv-core",
+ "itoa",
+ "ryu",
+ "serde",
]
[[package]]
-name = "cxxbridge-flags"
-version = "1.0.86"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c"
-
-[[package]]
-name = "cxxbridge-macro"
-version = "1.0.86"
+name = "csv-core"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5"
+checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70"
dependencies = [
- "proc-macro2",
- "quote",
- "syn",
+ "memchr",
]
[[package]]
@@ -421,14 +470,10 @@ dependencies = [
]
[[package]]
-name = "deflate"
-version = "0.8.6"
+name = "deranged"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174"
-dependencies = [
- "adler32",
- "byteorder",
-]
+checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
[[package]]
name = "derive-new"
@@ -438,33 +483,63 @@ checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 1.0.109",
]
[[package]]
name = "digest"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
[[package]]
name = "display-info"
-version = "0.4.1"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15453e90755c09fc70a6dbc9a307b0d4ec0fa65c5e36fb7cf8246109c442c331"
+checksum = "4f9fb6a73233755f827129d80a80a6a16448122040537c881248a09d5c80ab6b"
dependencies = [
"anyhow",
- "core-graphics 0.22.3",
+ "core-graphics 0.23.1",
"fxhash",
"widestring",
- "windows",
+ "windows 0.48.0",
"xcb",
]
+[[package]]
+name = "dlib"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
+dependencies = [
+ "libloading",
+]
+
[[package]]
name = "doc-comment"
version = "0.3.3"
@@ -479,9 +554,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "dyn-clone"
-version = "1.0.10"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60"
+checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555"
[[package]]
name = "edit-distance"
@@ -490,82 +565,107 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbbaaaf38131deb9ca518a274a45bfdb8771f139517b073b16c2d3d32ae5037b"
[[package]]
-name = "educe"
-version = "0.4.20"
+name = "either"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4"
-dependencies = [
- "enum-ordinalize",
- "proc-macro2",
- "quote",
- "syn",
-]
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
-name = "either"
-version = "1.8.0"
+name = "encode_unicode"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+
+[[package]]
+name = "encode_unicode"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
[[package]]
name = "encoding_rs"
-version = "0.8.31"
+version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b"
+checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
dependencies = [
"cfg-if",
]
[[package]]
name = "enigo"
-version = "0.0.14"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95ce8d7672e87b3155fd5e8a9226276da5c833e15bc879c7b98a78f743b67814"
+checksum = "802e4b2ae123615659085369b453cba87c5562e46ed8050a909fee18a9bc3157"
dependencies = [
- "core-graphics 0.18.0",
+ "core-graphics 0.23.1",
"libc",
"objc",
"pkg-config",
- "unicode-segmentation",
- "winapi",
-]
-
-[[package]]
-name = "enum-ordinalize"
-version = "3.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a"
-dependencies = [
- "num-bigint",
- "num-traits",
- "proc-macro2",
- "quote",
- "rustc_version",
- "syn",
+ "windows 0.51.1",
]
[[package]]
name = "env_logger"
-version = "0.9.3"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
dependencies = [
- "atty",
"humantime",
+ "is-terminal",
"log",
"regex",
"termcolor",
]
[[package]]
-name = "fastrand"
-version = "1.8.0"
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd"
dependencies = [
- "instant",
+ "errno-dragonfly",
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "exr"
+version = "1.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "279d3efcc55e19917fff7ab3ddd6c14afb6a90881a0078465196fe2f99d08c56"
+dependencies = [
+ "bit_field",
+ "flume",
+ "half",
+ "lebe",
+ "miniz_oxide",
+ "rayon-core",
+ "smallvec",
+ "zune-inflate",
]
+[[package]]
+name = "fastrand"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
+
[[package]]
name = "fdeflate"
version = "0.3.0"
@@ -577,30 +677,37 @@ dependencies = [
[[package]]
name = "filetime"
-version = "0.2.19"
+version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9"
+checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall",
- "windows-sys 0.42.0",
+ "redox_syscall 0.3.5",
+ "windows-sys 0.48.0",
]
[[package]]
-name = "fixedbitset"
-version = "0.4.2"
+name = "flate2"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
[[package]]
-name = "flate2"
-version = "1.0.25"
+name = "flume"
+version = "0.10.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
+checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
dependencies = [
- "crc32fast",
- "miniz_oxide 0.6.2",
+ "futures-core",
+ "futures-sink",
+ "nanorand",
+ "pin-project",
+ "spin",
]
[[package]]
@@ -615,7 +722,28 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
- "foreign-types-shared",
+ "foreign-types-shared 0.1.1",
+]
+
+[[package]]
+name = "foreign-types"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
+dependencies = [
+ "foreign-types-macros",
+ "foreign-types-shared 0.3.1",
+]
+
+[[package]]
+name = "foreign-types-macros"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
]
[[package]]
@@ -624,53 +752,59 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+[[package]]
+name = "foreign-types-shared"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+
[[package]]
name = "form_urlencoded"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
dependencies = [
"percent-encoding",
]
[[package]]
name = "futures-channel"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
+checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
+checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"
[[package]]
name = "futures-io"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
+checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"
[[package]]
name = "futures-sink"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
+checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"
[[package]]
name = "futures-task"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
+checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"
[[package]]
name = "futures-util"
-version = "0.3.25"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
+checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
dependencies = [
"futures-core",
"futures-io",
@@ -692,9 +826,9 @@ dependencies = [
[[package]]
name = "generic-array"
-version = "0.14.6"
+version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
@@ -702,30 +836,38 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.8"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
+checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasi",
+ "wasm-bindgen",
]
[[package]]
name = "gif"
-version = "0.11.4"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06"
+checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045"
dependencies = [
"color_quant",
"weezl",
]
[[package]]
-name = "h2"
-version = "0.3.15"
+name = "gimli"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
+checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
+
+[[package]]
+name = "h2"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
dependencies = [
"bytes",
"fnv",
@@ -733,7 +875,7 @@ dependencies = [
"futures-sink",
"futures-util",
"http",
- "indexmap",
+ "indexmap 1.9.3",
"slab",
"tokio",
"tokio-util",
@@ -742,9 +884,14 @@ dependencies = [
[[package]]
name = "half"
-version = "1.8.2"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+ "num-traits",
+]
[[package]]
name = "hashbrown"
@@ -753,43 +900,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
-name = "heck"
-version = "0.3.3"
+name = "hashbrown"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
+checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
- "unicode-segmentation",
+ "ahash",
]
[[package]]
name = "heck"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
-
-[[package]]
-name = "hermit-abi"
-version = "0.1.19"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
-dependencies = [
- "libc",
-]
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
-version = "0.2.6"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
-dependencies = [
- "libc",
-]
+checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
[[package]]
name = "http"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
"bytes",
"fnv",
@@ -815,9 +950,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "humantime"
@@ -827,9 +962,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.23"
+version = "0.14.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
dependencies = [
"bytes",
"futures-channel",
@@ -842,7 +977,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
+ "socket2 0.4.9",
"tokio",
"tower-service",
"tracing",
@@ -862,35 +997,11 @@ dependencies = [
"tokio-native-tls",
]
-[[package]]
-name = "iana-time-zone"
-version = "0.1.53"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
-dependencies = [
- "android_system_properties",
- "core-foundation-sys 0.8.3",
- "iana-time-zone-haiku",
- "js-sys",
- "wasm-bindgen",
- "winapi",
-]
-
-[[package]]
-name = "iana-time-zone-haiku"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
-dependencies = [
- "cxx",
- "cxx-build",
-]
-
[[package]]
name = "idna"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
dependencies = [
"unicode-bidi",
"unicode-normalization",
@@ -898,31 +1009,64 @@ dependencies = [
[[package]]
name = "image"
-version = "0.23.14"
+version = "0.24.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1"
+checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
+ "exr",
"gif",
"jpeg-decoder",
- "num-iter",
"num-rational",
"num-traits",
- "png 0.16.8",
- "scoped_threadpool",
+ "png",
+ "qoi",
"tiff",
]
[[package]]
name = "indexmap"
-version = "1.9.2"
+version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
- "hashbrown",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.14.3",
+]
+
+[[package]]
+name = "indicatif"
+version = "0.17.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730"
+dependencies = [
+ "console",
+ "instant",
+ "number_prefix",
+ "portable-atomic",
+ "unicode-width",
+]
+
+[[package]]
+name = "indicatif-log-bridge"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2963046f28a204e3e3fd7e754fd90a6235da05b5378f24707ff0ec9513725ce3"
+dependencies = [
+ "indicatif",
+ "log",
]
[[package]]
@@ -934,11 +1078,33 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "io-lifetimes"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "ipnet"
-version = "2.7.1"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146"
+checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
+dependencies = [
+ "hermit-abi",
+ "rustix",
+ "windows-sys 0.48.0",
+]
[[package]]
name = "itertools"
@@ -949,37 +1115,47 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
-version = "1.0.5"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "jpeg-decoder"
-version = "0.1.22"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2"
+checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e"
dependencies = [
"rayon",
]
[[package]]
name = "js-sys"
-version = "0.3.60"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "kstring"
-version = "1.0.6"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b310ccceade8121d7d77fee406160e457c2f4e7c7982d589da3499bc7ea4526"
+checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747"
dependencies = [
"serde",
+ "static_assertions",
]
[[package]]
@@ -988,38 +1164,84 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+[[package]]
+name = "lebe"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
+
[[package]]
name = "libc"
-version = "0.2.139"
+version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
+checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libdbus-sys"
-version = "0.2.3"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2264f9d90a9b4e60a2dc722ad899ea0374f03c2e96e755fe22a8f551d4d5fb3c"
+checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72"
dependencies = [
+ "cc",
"pkg-config",
]
[[package]]
-name = "link-cplusplus"
-version = "1.0.8"
+name = "libloading"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "libm"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
+
+[[package]]
+name = "libredox"
+version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
+checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
dependencies = [
- "cc",
+ "bitflags 2.4.0",
+ "libc",
+ "redox_syscall 0.4.1",
+]
+
+[[package]]
+name = "libwayshot"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "896d0e594158b7f5188034836a6c4886492078352c39760786e54f1b796caaea"
+dependencies = [
+ "image",
+ "log",
+ "memmap2 0.7.1",
+ "nix",
+ "thiserror",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-protocols-wlr",
]
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
+
[[package]]
name = "liquid"
-version = "0.23.1"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26e930310cf4334c4936ae18737500a57739c69442b5c42bae114d619af54b82"
+checksum = "69f68ae1011499ae2ef879f631891f21c78e309755f4a5e483c4a8f12e10b609"
dependencies = [
"doc-comment",
- "kstring",
"liquid-core",
"liquid-derive",
"liquid-lib",
@@ -1028,57 +1250,64 @@ dependencies = [
[[package]]
name = "liquid-core"
-version = "0.23.2"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8eae470f061bfc53607283906de925ab67ed57a341e827146e3b241699a1dcde"
+checksum = "79e0724dfcaad5cfb7965ea0f178ca0870b8d7315178f4a7179f5696f7f04d5f"
dependencies = [
"anymap2",
- "chrono",
- "itertools",
+ "itertools 0.10.5",
"kstring",
"liquid-derive",
"num-traits",
"pest",
"pest_derive",
+ "regex",
"serde",
+ "time",
]
[[package]]
name = "liquid-derive"
-version = "0.23.1"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6510e456700da1afe07603913b0da5a2595f2482656ade07abf719aae7501f0a"
+checksum = "fc2fb41a9bb4257a3803154bdf7e2df7d45197d1941c9b1a90ad815231630721"
dependencies = [
"proc-macro2",
- "proc-quote",
- "syn",
+ "quote",
+ "syn 2.0.52",
]
[[package]]
name = "liquid-lib"
-version = "0.23.1"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6341259f779ff663bdf1fc478bddb2ca51fda25414006dc69395eddfac07e0a4"
+checksum = "e2a17e273a6fb1fb6268f7a5867ddfd0bd4683c7e19b51084f3d567fad4348c0"
dependencies = [
- "chrono",
- "itertools",
- "kstring",
+ "itertools 0.10.5",
"liquid-core",
"once_cell",
"percent-encoding",
"regex",
+ "time",
"unicode-segmentation",
]
[[package]]
-name = "log"
-version = "0.4.17"
+name = "lock_api"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
dependencies = [
- "cfg-if",
+ "autocfg",
+ "scopeguard",
]
+[[package]]
+name = "log"
+version = "0.4.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -1094,79 +1323,69 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
-[[package]]
-name = "mapr"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46a28a55dbc005b2f6f123c4058933d57add373d362f6fd3a76aab4fe6973500"
-dependencies = [
- "libc",
- "winapi",
-]
-
[[package]]
name = "matrixmultiply"
-version = "0.3.2"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84"
+checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77"
dependencies = [
+ "autocfg",
"rawpointer",
]
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
[[package]]
-name = "memoffset"
+name = "memmap2"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
+checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6"
dependencies = [
- "autocfg",
+ "libc",
]
[[package]]
-name = "mime"
-version = "0.3.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
-
-[[package]]
-name = "minimal-lexical"
-version = "0.2.1"
+name = "memmap2"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
+checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322"
+dependencies = [
+ "libc",
+]
[[package]]
-name = "miniz_oxide"
-version = "0.3.7"
+name = "memoffset"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
+checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
- "adler32",
+ "autocfg",
]
[[package]]
-name = "miniz_oxide"
-version = "0.4.4"
+name = "memoffset"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
dependencies = [
- "adler",
"autocfg",
]
[[package]]
-name = "miniz_oxide"
-version = "0.6.2"
+name = "mime"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
-dependencies = [
- "adler",
-]
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "minimal-lexical"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
@@ -1180,21 +1399,23 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.5"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
+checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
dependencies = [
"libc",
- "log",
- "wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.42.0",
+ "wasi",
+ "windows-sys 0.48.0",
]
[[package]]
-name = "multimap"
-version = "0.8.3"
+name = "nanorand"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
+checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
+dependencies = [
+ "getrandom",
+]
[[package]]
name = "native-tls"
@@ -1227,32 +1448,43 @@ dependencies = [
"rawpointer",
]
+[[package]]
+name = "nix"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
+dependencies = [
+ "bitflags 1.3.2",
+ "cfg-if",
+ "libc",
+ "memoffset 0.7.1",
+ "pin-utils",
+]
+
[[package]]
name = "nom"
-version = "7.1.2"
+version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5507769c4919c998e69e49c839d9dc6e693ede4cc4290d6ad8b41d4f09c548c"
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
-name = "num-bigint"
-version = "0.4.3"
+name = "ntapi"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
+ "winapi",
]
[[package]]
name = "num-complex"
-version = "0.4.2"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19"
+checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214"
dependencies = [
"num-traits",
]
@@ -1267,22 +1499,11 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "num-iter"
-version = "0.1.43"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
[[package]]
name = "num-rational"
-version = "0.3.2"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-integer",
@@ -1291,23 +1512,30 @@ dependencies = [
[[package]]
name = "num-traits"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
dependencies = [
"autocfg",
+ "libm",
]
[[package]]
name = "num_cpus"
-version = "1.15.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi 0.2.6",
+ "hermit-abi",
"libc",
]
+[[package]]
+name = "number_prefix"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
+
[[package]]
name = "objc"
version = "0.2.7"
@@ -1317,21 +1545,30 @@ dependencies = [
"malloc_buf",
]
+[[package]]
+name = "object"
+version = "0.32.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "once_cell"
-version = "1.17.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "openssl"
-version = "0.10.45"
+version = "0.10.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
+checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c"
dependencies = [
- "bitflags",
+ "bitflags 2.4.0",
"cfg-if",
- "foreign-types",
+ "foreign-types 0.3.2",
"libc",
"once_cell",
"openssl-macros",
@@ -1340,13 +1577,13 @@ dependencies = [
[[package]]
name = "openssl-macros"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
]
[[package]]
@@ -1357,11 +1594,10 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
-version = "0.9.80"
+version = "0.9.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7"
+checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d"
dependencies = [
- "autocfg",
"cc",
"libc",
"pkg-config",
@@ -1370,42 +1606,66 @@ dependencies = [
[[package]]
name = "os_info"
-version = "3.5.1"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4750134fb6a5d49afc80777394ad5d95b04bc12068c6abb92fae8f43817270f"
+checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e"
dependencies = [
"log",
"serde",
"winapi",
]
+[[package]]
+name = "parking_lot"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.4.1",
+ "smallvec",
+ "windows-targets 0.48.5",
+]
+
[[package]]
name = "paste"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
name = "percent-encoding"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
-version = "2.5.2"
+version = "2.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f6e86fb9e7026527a0d46bc308b841d73170ef8f443e1807f6ef88526a816d4"
+checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33"
dependencies = [
+ "memchr",
"thiserror",
"ucd-trie",
]
[[package]]
name = "pest_derive"
-version = "2.5.2"
+version = "2.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96504449aa860c8dcde14f9fba5c58dc6658688ca1fe363589d6327b8662c603"
+checksum = "a2bee7be22ce7918f641a33f08e3f43388c7656772244e2bbb2477f44cc9021a"
dependencies = [
"pest",
"pest_generator",
@@ -1413,80 +1673,84 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.5.2"
+version = "2.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "798e0220d1111ae63d66cb66a5dcb3fc2d986d520b98e49e1852bfdb11d7c5e7"
+checksum = "d1511785c5e98d79a05e8a6bc34b4ac2168a0e3e92161862030ad84daa223141"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
]
[[package]]
name = "pest_meta"
-version = "2.5.2"
+version = "2.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "984298b75898e30a843e278a9f2452c31e349a073a0ce6fd950a12a74464e065"
+checksum = "b42f0394d3123e33353ca5e1e89092e533d2cc490389f2bd6131c43c634ebc5f"
dependencies = [
"once_cell",
"pest",
- "sha1",
+ "sha2",
]
[[package]]
-name = "petgraph"
-version = "0.6.2"
+name = "pin-project"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
dependencies = [
- "fixedbitset",
- "indexmap",
+ "pin-project-internal",
]
[[package]]
-name = "pin-project-lite"
-version = "0.2.9"
+name = "pin-project-internal"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
-
-[[package]]
-name = "pin-utils"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+
+[[package]]
+name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
-version = "0.3.26"
+version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
+checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
[[package]]
name = "png"
-version = "0.16.8"
+version = "0.17.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6"
+checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"crc32fast",
- "deflate",
- "miniz_oxide 0.3.7",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
]
[[package]]
-name = "png"
-version = "0.17.8"
+name = "portable-atomic"
+version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa"
-dependencies = [
- "bitflags",
- "crc32fast",
- "fdeflate",
- "flate2",
- "miniz_oxide 0.7.1",
-]
+checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b"
[[package]]
name = "ppv-lite86"
@@ -1495,111 +1759,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
-name = "proc-macro-hack"
-version = "0.5.20+deprecated"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.70"
+name = "prettytable-rs"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b"
+checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a"
dependencies = [
- "unicode-ident",
+ "csv",
+ "encode_unicode 1.0.0",
+ "is-terminal",
+ "lazy_static",
+ "term",
+ "unicode-width",
]
[[package]]
-name = "proc-quote"
-version = "0.4.0"
+name = "primal-check"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e84ab161de78c915302ca325a19bee6df272800e2ae1a43fe3ef430bab2a100"
+checksum = "9df7f93fd637f083201473dab4fee2db4c429d32e55e3299980ab3957ab916a0"
dependencies = [
- "proc-macro-hack",
- "proc-macro2",
- "proc-quote-impl",
- "quote",
- "syn",
+ "num-integer",
]
[[package]]
-name = "proc-quote-impl"
-version = "0.3.2"
+name = "proc-macro2"
+version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fb3ec628b063cdbcf316e06a8b8c1a541d28fa6c0a8eacd2bfb2b7f49e88aa0"
+checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
dependencies = [
- "proc-macro-hack",
- "proc-macro2",
- "quote",
+ "unicode-ident",
]
[[package]]
name = "prost"
-version = "0.9.0"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001"
+checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
dependencies = [
"bytes",
"prost-derive",
]
[[package]]
-name = "prost-build"
-version = "0.9.0"
+name = "prost-derive"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
dependencies = [
- "bytes",
- "heck 0.3.3",
- "itertools",
- "lazy_static",
- "log",
- "multimap",
- "petgraph",
- "prost",
- "prost-types",
- "regex",
- "tempfile",
- "which",
+ "anyhow",
+ "itertools 0.10.5",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
]
[[package]]
-name = "prost-derive"
-version = "0.9.0"
+name = "qoi"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe"
+checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
dependencies = [
- "anyhow",
- "itertools",
- "proc-macro2",
- "quote",
- "syn",
+ "bytemuck",
]
[[package]]
-name = "prost-types"
-version = "0.9.0"
+name = "quick-xml"
+version = "0.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a"
+checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1"
dependencies = [
- "bytes",
- "prost",
+ "memchr",
]
[[package]]
name = "quick-xml"
-version = "0.22.0"
+version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b"
+checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
dependencies = [
"memchr",
]
[[package]]
name = "quote"
-version = "1.0.23"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
+checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
@@ -1634,6 +1879,16 @@ dependencies = [
"getrandom",
]
+[[package]]
+name = "rand_distr"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
+dependencies = [
+ "num-traits",
+ "rand",
+]
+
[[package]]
name = "rawpointer"
version = "0.2.1"
@@ -1642,9 +1897,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
[[package]]
name = "rayon"
-version = "1.6.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7"
+checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd"
dependencies = [
"either",
"rayon-core",
@@ -1652,56 +1907,77 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.10.1"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
- "crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils",
- "num_cpus",
]
[[package]]
name = "redox_syscall"
-version = "0.2.16"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
dependencies = [
- "bitflags",
+ "getrandom",
+ "libredox",
+ "thiserror",
]
[[package]]
name = "regex"
-version = "1.7.0"
+version = "1.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
+checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
dependencies = [
"aho-corasick",
"memchr",
+ "regex-automata",
"regex-syntax",
]
[[package]]
-name = "regex-syntax"
-version = "0.6.28"
+name = "regex-automata"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
+checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
[[package]]
-name = "remove_dir_all"
-version = "0.5.3"
+name = "regex-syntax"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
-dependencies = [
- "winapi",
-]
+checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
[[package]]
name = "reqwest"
-version = "0.11.13"
+version = "0.11.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
+checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
dependencies = [
"base64",
"bytes",
@@ -1735,25 +2011,50 @@ dependencies = [
]
[[package]]
-name = "rustc_version"
-version = "0.4.0"
+name = "rustc-demangle"
+version = "0.1.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+
+[[package]]
+name = "rustfft"
+version = "6.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
+checksum = "43806561bc506d0c5d160643ad742e3161049ac01027b5e6d7524091fd401d86"
dependencies = [
- "semver",
+ "num-complex",
+ "num-integer",
+ "num-traits",
+ "primal-check",
+ "strength_reduce",
+ "transpose",
+ "version_check",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453"
+dependencies = [
+ "bitflags 2.4.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.48.0",
]
[[package]]
name = "rustversion"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
[[package]]
name = "ryu"
-version = "1.0.12"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "same-file"
@@ -1765,104 +2066,108 @@ dependencies = [
]
[[package]]
-name = "schannel"
-version = "0.1.20"
+name = "scan_fmt"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2"
+checksum = "0b53b0a5db882a8e2fdaae0a43f7b39e7e9082389e978398bdf223a55b581248"
dependencies = [
- "lazy_static",
- "windows-sys 0.36.1",
+ "regex",
]
[[package]]
-name = "scoped_threadpool"
-version = "0.1.9"
+name = "schannel"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
+dependencies = [
+ "windows-sys 0.48.0",
+]
[[package]]
-name = "scopeguard"
-version = "1.1.0"
+name = "scoped-tls"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
-name = "scratch"
-version = "1.0.3"
+name = "scopeguard"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "screenshots"
-version = "0.5.3"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0af08077596f1a9a4058fc4fcc95f523c5dbac873e6ef4b921d6e4bf36bc1048"
+checksum = "7187581a91266356e1a99500061ce6b5c5e7a925ae6244b3e71a7b807046bad3"
dependencies = [
"anyhow",
"core-graphics 0.22.3",
"dbus",
"display-info",
"fxhash",
- "png 0.17.8",
+ "image",
+ "libwayshot",
+ "percent-encoding",
"widestring",
- "windows",
+ "windows 0.48.0",
"xcb",
]
[[package]]
name = "security-framework"
-version = "2.7.0"
+version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
dependencies = [
- "bitflags",
- "core-foundation 0.9.3",
- "core-foundation-sys 0.8.3",
+ "bitflags 1.3.2",
+ "core-foundation",
+ "core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
-version = "2.6.1"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
dependencies = [
- "core-foundation-sys 0.8.3",
+ "core-foundation-sys",
"libc",
]
[[package]]
name = "semver"
-version = "1.0.16"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
+checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
[[package]]
name = "serde"
-version = "1.0.152"
+version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
+checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.152"
+version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
+checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
]
[[package]]
name = "serde_json"
-version = "1.0.91"
+version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
+checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360"
dependencies = [
"itoa",
"ryu",
@@ -1882,10 +2187,23 @@ dependencies = [
]
[[package]]
-name = "sha1"
-version = "0.10.5"
+name = "serde_yaml"
+version = "0.9.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129"
+dependencies = [
+ "indexmap 2.2.5",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1894,76 +2212,144 @@ dependencies = [
[[package]]
name = "simd-adler32"
-version = "0.3.5"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "238abfbb77c1915110ad968465608b68e869e0772622c9656714e73e5a1a522f"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "slab"
-version = "0.4.7"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
[[package]]
name = "socket2"
-version = "0.4.7"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
"libc",
"winapi",
]
+[[package]]
+name = "socket2"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strength_reduce"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82"
+
+[[package]]
+name = "string-interner"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07f9fdfdd31a0ff38b59deb401be81b73913d76c9cc5b1aed4e1330a223420b9"
+dependencies = [
+ "cfg-if",
+ "hashbrown 0.14.3",
+ "serde",
+]
+
[[package]]
name = "strsim"
-version = "0.8.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
-version = "0.24.1"
+version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
+checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
[[package]]
name = "strum_macros"
-version = "0.24.3"
+version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
+checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059"
dependencies = [
- "heck 0.4.0",
+ "heck",
"proc-macro2",
"quote",
"rustversion",
- "syn",
+ "syn 2.0.52",
]
[[package]]
name = "syn"
-version = "1.0.107"
+version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
+[[package]]
+name = "syn"
+version = "2.0.52"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sysinfo"
+version = "0.30.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6746919caf9f2a85bff759535664c060109f21975c5ac2e8652e60102bd4d196"
+dependencies = [
+ "cfg-if",
+ "core-foundation-sys",
+ "libc",
+ "ntapi",
+ "once_cell",
+ "rayon",
+ "windows 0.52.0",
+]
+
[[package]]
name = "tar"
-version = "0.4.38"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6"
+checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb"
dependencies = [
"filetime",
"libc",
@@ -1972,76 +2358,94 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.3.0"
+version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
dependencies = [
"cfg-if",
"fastrand",
- "libc",
- "redox_syscall",
- "remove_dir_all",
- "winapi",
+ "redox_syscall 0.3.5",
+ "rustix",
+ "windows-sys 0.48.0",
]
[[package]]
-name = "termcolor"
-version = "1.1.3"
+name = "term"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
+checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
dependencies = [
- "winapi-util",
+ "dirs-next",
+ "rustversion",
+ "winapi",
]
[[package]]
-name = "textwrap"
-version = "0.11.0"
+name = "termcolor"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
dependencies = [
- "unicode-width",
+ "winapi-util",
]
[[package]]
name = "thiserror"
-version = "1.0.38"
+version = "1.0.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
+checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.38"
+version = "1.0.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
+checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
]
[[package]]
name = "tiff"
-version = "0.6.1"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437"
+checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211"
dependencies = [
+ "flate2",
"jpeg-decoder",
- "miniz_oxide 0.4.4",
"weezl",
]
[[package]]
name = "time"
-version = "0.1.45"
+version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
+checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
dependencies = [
- "libc",
- "wasi 0.10.0+wasi-snapshot-preview1",
- "winapi",
+ "deranged",
+ "itoa",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+
+[[package]]
+name = "time-macros"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
+dependencies = [
+ "time-core",
]
[[package]]
@@ -2055,32 +2459,31 @@ dependencies = [
[[package]]
name = "tinyvec_macros"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.24.1"
+version = "1.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae"
+checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
dependencies = [
- "autocfg",
+ "backtrace",
"bytes",
"libc",
- "memchr",
"mio",
"num_cpus",
"pin-project-lite",
- "socket2",
- "windows-sys 0.42.0",
+ "socket2 0.5.3",
+ "windows-sys 0.48.0",
]
[[package]]
name = "tokio-native-tls"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
"tokio",
@@ -2088,9 +2491,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.4"
+version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740"
+checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
dependencies = [
"bytes",
"futures-core",
@@ -2102,9 +2505,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.5.10"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
@@ -2128,32 +2531,33 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.30"
+version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
+checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
dependencies = [
"once_cell",
]
[[package]]
name = "tract-core"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ec224e77668b0857a0b93b21994323672e53479057cfa8fb4a6987086c9c879"
+checksum = "b61f2cff6b36a1385cffa0419daf8578cc9c7d3d3ec5d4f62082d5b2beb18699"
dependencies = [
"anyhow",
"bit-set",
"derive-new",
"downcast-rs",
"dyn-clone",
- "educe",
- "half",
"lazy_static",
"log",
"maplit",
"ndarray",
+ "num-complex",
"num-integer",
"num-traits",
+ "paste",
+ "rustfft",
"smallvec",
"tract-data",
"tract-linalg",
@@ -2161,54 +2565,55 @@ dependencies = [
[[package]]
name = "tract-data"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1609c2b286a347d3040c7234e204de170920ec3709b15521defe098c0f8a5a67"
+checksum = "60d273009dc7ec8101fb8fdfc4a905eabfd48c5ea49d4cf30c20de7ada6aae2c"
dependencies = [
"anyhow",
- "educe",
"half",
- "itertools",
+ "itertools 0.12.1",
"lazy_static",
"maplit",
"ndarray",
- "num-complex",
+ "nom",
"num-integer",
"num-traits",
+ "scan_fmt",
"smallvec",
+ "string-interner",
]
[[package]]
name = "tract-hir"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b579830105a172704676ca4da670931010577070e869724be6740ec43d4cc3eb"
+checksum = "b54e67b476006d4422101f413459b842f2470d7ae594bd24d669d7433d9613c5"
dependencies = [
"derive-new",
- "educe",
"log",
"tract-core",
]
[[package]]
name = "tract-linalg"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f51d85987d90f5e6479dbe203cbf259eb9208ff4e1c94870ab0ca61492171bb"
+checksum = "4eebd82a81656eebc479eea84cee391be259b7bbd9719f96c4b4c6678748f2d6"
dependencies = [
"cc",
"derive-new",
"downcast-rs",
"dyn-clone",
- "educe",
"half",
"lazy_static",
- "libc",
"liquid",
+ "liquid-core",
"log",
"num-traits",
"paste",
+ "scan_fmt",
"smallvec",
+ "time",
"tract-data",
"unicode-normalization",
"walkdir",
@@ -2216,9 +2621,9 @@ dependencies = [
[[package]]
name = "tract-nnef"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6b15a11fea45a9f69c595cf386c87e4c3cd45d1323e7b5f430004a8cd11d2c4"
+checksum = "8e08aa7b7b1f0e5317aa4832f220a847eb3177cfeefb94a089aae2bde867c2d2"
dependencies = [
"byteorder",
"flate2",
@@ -2231,18 +2636,16 @@ dependencies = [
[[package]]
name = "tract-onnx"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a9a6eb2116cdab535b5b9f1771e82acebea419f2571bd688e267451de3506ce"
+checksum = "a123632dae75ed9b1281a11e8454c4cb6cfbdf01dc774c53a5fcebcd689ca509"
dependencies = [
"bytes",
"derive-new",
- "educe",
"log",
- "mapr",
+ "memmap2 0.9.4",
"num-integer",
"prost",
- "prost-build",
"smallvec",
"tract-hir",
"tract-nnef",
@@ -2251,14 +2654,28 @@ dependencies = [
[[package]]
name = "tract-onnx-opl"
-version = "0.15.8"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a45ed1d95f1deef2a6240d296fa0eaf97dc4b15df32be7a5220ee825e0a3fc4d"
+checksum = "241339a78880a8e5dfcc107df5943459eaa38bc3118cef64261e133746cc6621"
dependencies = [
- "educe",
+ "getrandom",
+ "log",
+ "rand",
+ "rand_distr",
+ "rustfft",
"tract-nnef",
]
+[[package]]
+name = "transpose"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e"
+dependencies = [
+ "num-integer",
+ "strength_reduce",
+]
+
[[package]]
name = "try-lock"
version = "0.2.4"
@@ -2273,21 +2690,21 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
[[package]]
name = "ucd-trie"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
+checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
[[package]]
name = "unicode-bidi"
-version = "0.3.8"
+version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]]
name = "unicode-ident"
-version = "1.0.6"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
+checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
[[package]]
name = "unicode-normalization"
@@ -2300,9 +2717,9 @@ dependencies = [
[[package]]
name = "unicode-segmentation"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a"
+checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "unicode-width"
@@ -2310,11 +2727,17 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+[[package]]
+name = "unsafe-libyaml"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b"
+
[[package]]
name = "url"
-version = "2.3.1"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna",
@@ -2322,16 +2745,16 @@ dependencies = [
]
[[package]]
-name = "vcpkg"
-version = "0.2.15"
+name = "utf8parse"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
-name = "vec_map"
-version = "0.8.2"
+name = "vcpkg"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
@@ -2341,31 +2764,23 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "walkdir"
-version = "2.3.2"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file",
- "winapi",
"winapi-util",
]
[[package]]
name = "want"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
dependencies = [
- "log",
"try-lock",
]
-[[package]]
-name = "wasi"
-version = "0.10.0+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
-
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -2374,9 +2789,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.83"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -2384,24 +2799,24 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.83"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.33"
+version = "0.4.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d"
+checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03"
dependencies = [
"cfg-if",
"js-sys",
@@ -2411,9 +2826,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.83"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2421,28 +2836,102 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.83"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.52",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.83"
+version = "0.2.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
+
+[[package]]
+name = "wayland-backend"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41b48e27457e8da3b2260ac60d0a94512f5cba36448679f3747c0865b7893ed8"
+dependencies = [
+ "cc",
+ "downcast-rs",
+ "io-lifetimes",
+ "nix",
+ "scoped-tls",
+ "smallvec",
+ "wayland-sys",
+]
+
+[[package]]
+name = "wayland-client"
+version = "0.30.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8"
+dependencies = [
+ "bitflags 1.3.2",
+ "nix",
+ "wayland-backend",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols"
+version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b28101e5ca94f70461a6c2d610f76d85ad223d042dd76585ab23d3422dd9b4d"
+dependencies = [
+ "bitflags 1.3.2",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols-wlr"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fce991093320e4a6a525876e6b629ab24da25f9baef0c2e0080ad173ec89588a"
+dependencies = [
+ "bitflags 1.3.2",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-scanner"
+version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9b873b257fbc32ec909c0eb80dea312076a67014e65e245f5eb69a6b8ab330e"
+dependencies = [
+ "proc-macro2",
+ "quick-xml 0.28.2",
+ "quote",
+]
+
+[[package]]
+name = "wayland-sys"
+version = "0.30.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06"
+dependencies = [
+ "dlib",
+ "log",
+ "pkg-config",
+]
[[package]]
name = "web-sys"
-version = "0.3.60"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
+checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -2454,17 +2943,6 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
-[[package]]
-name = "which"
-version = "4.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b"
-dependencies = [
- "either",
- "libc",
- "once_cell",
-]
-
[[package]]
name = "widestring"
version = "1.0.2"
@@ -2504,39 +2982,108 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
-version = "0.44.0"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows"
+version = "0.51.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9"
+dependencies = [
+ "windows-core 0.51.1",
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
+dependencies = [
+ "windows-core 0.52.0",
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows"
+version = "0.54.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49"
+dependencies = [
+ "windows-core 0.54.0",
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows-capture"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b"
+checksum = "33d819f3fbf3fe142be4c26c21374d9629c1681be346fbee371778d8c1555f46"
dependencies = [
- "windows-targets",
+ "parking_lot",
+ "rayon",
+ "thiserror",
+ "windows 0.54.0",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.51.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.54.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.4",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64"
+dependencies = [
+ "windows-targets 0.52.4",
]
[[package]]
name = "windows-sys"
-version = "0.36.1"
+version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
- "windows_aarch64_msvc 0.36.1",
- "windows_i686_gnu 0.36.1",
- "windows_i686_msvc 0.36.1",
- "windows_x86_64_gnu 0.36.1",
- "windows_x86_64_msvc 0.36.1",
+ "windows-targets 0.42.2",
]
[[package]]
name = "windows-sys"
-version = "0.42.0"
+version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc 0.42.2",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -2545,15 +3092,45 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
dependencies = [
- "windows_aarch64_gnullvm",
+ "windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm",
+ "windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.4",
+ "windows_aarch64_msvc 0.52.4",
+ "windows_i686_gnu 0.52.4",
+ "windows_i686_msvc 0.52.4",
+ "windows_x86_64_gnu 0.52.4",
+ "windows_x86_64_gnullvm 0.52.4",
+ "windows_x86_64_msvc 0.52.4",
+]
+
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
@@ -2561,10 +3138,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
-name = "windows_aarch64_msvc"
-version = "0.36.1"
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
+checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
@@ -2573,10 +3156,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
-name = "windows_i686_gnu"
-version = "0.36.1"
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
+checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
@@ -2585,10 +3174,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
-name = "windows_i686_msvc"
-version = "0.36.1"
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
+checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
@@ -2597,10 +3192,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
-name = "windows_x86_64_gnu"
-version = "0.36.1"
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
+checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
@@ -2608,6 +3209,18 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
+
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
@@ -2615,10 +3228,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
-name = "windows_x86_64_msvc"
-version = "0.36.1"
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
+checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
@@ -2626,13 +3245,26 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
+
[[package]]
name = "winreg"
-version = "0.10.1"
+version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
- "winapi",
+ "cfg-if",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -2646,40 +3278,74 @@ dependencies = [
[[package]]
name = "xattr"
-version = "0.2.3"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc"
+checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985"
dependencies = [
"libc",
]
+[[package]]
+name = "xcap"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6776c1b371ea7c73bc98a40ae5c6a69c648669ff2e6d8a03fc8b80ddc58a0498"
+dependencies = [
+ "core-foundation",
+ "core-graphics 0.23.1",
+ "dbus",
+ "image",
+ "log",
+ "percent-encoding",
+ "sysinfo",
+ "thiserror",
+ "windows 0.52.0",
+ "xcb",
+]
+
[[package]]
name = "xcb"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0faeb4d7e2d54fff4a0584f61297e86b106914af2029778de7b427f72564d6c5"
+checksum = "5d27b37e69b8c05bfadcd968eb1a4fe27c9c52565b727f88512f43b89567e262"
dependencies = [
- "bitflags",
+ "bitflags 1.3.2",
"libc",
- "quick-xml",
+ "quick-xml 0.30.0",
+]
+
+[[package]]
+name = "yas_derive"
+version = "0.1.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
]
[[package]]
name = "yas_scanner"
-version = "0.1.15"
+version = "0.1.14"
dependencies = [
+ "anyhow",
+ "bytesize",
"clap",
"cocoa",
- "core-foundation 0.9.3",
- "core-graphics 0.22.3",
+ "console",
+ "core-foundation",
+ "core-graphics 0.23.1",
"edit-distance",
"enigo",
- "env_logger",
"image",
+ "indicatif",
+ "indicatif-log-bridge",
"lazy_static",
"log",
+ "once_cell",
"os_info",
- "png 0.17.8",
+ "paste",
+ "png",
+ "prettytable-rs",
"rand",
"regex",
"reqwest",
@@ -2691,5 +3357,78 @@ dependencies = [
"strum_macros",
"tract-onnx",
"winapi",
+ "windows-capture",
+ "xcap",
+]
+
+[[package]]
+name = "yas_scanner_genshin"
+version = "0.1.16"
+dependencies = [
+ "anyhow",
+ "clap",
+ "edit-distance",
+ "env_logger",
+ "image",
+ "lazy_static",
+ "log",
+ "regex",
+ "serde",
+ "serde_json",
+ "serde_yaml",
+ "strum",
+ "strum_macros",
+ "windows-capture",
"winres",
+ "yas_derive",
+ "yas_scanner",
+]
+
+[[package]]
+name = "yas_scanner_starrail"
+version = "0.1.14"
+dependencies = [
+ "anyhow",
+ "clap",
+ "edit-distance",
+ "env_logger",
+ "image",
+ "lazy_static",
+ "log",
+ "regex",
+ "serde",
+ "serde_json",
+ "strum",
+ "strum_macros",
+ "winres",
+ "yas_scanner",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.52",
+]
+
+[[package]]
+name = "zune-inflate"
+version = "0.2.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
+dependencies = [
+ "simd-adler32",
]
diff --git a/Cargo.toml b/Cargo.toml
index 45658e82..274c8dee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,62 +1,13 @@
-[package]
-name = "yas_scanner"
-version = "0.1.15"
-edition = "2018"
-build = "build.rs"
-description = "Genshin Impact item scanner"
-repository = "https://github.com/wormtql/yas"
-keywords = ["GenshinImpact", "artifacts", "scanner", "ocr"]
-license = "GPL-2.0-or-later"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[dependencies]
-image = "0.23.14"
-enigo = "0.0.14"
-tract-onnx = "0.15.3"
-serde_json = "1.0.68"
-serde = { version = "1.0.130", features = ["derive"] }
-regex = "1.5.4"
-log = "0.4.14"
-env_logger = "0.9.0"
-edit-distance = "2.1.0"
-clap = "2.33.3"
-os_info = "3.0.7"
-strum = "0.24"
-strum_macros = "0.24"
-rand = "0.8.5"
-reqwest = { version = "0.11", features = ["blocking", "json"] }
-semver = "1.0.7"
-lazy_static = "1.4.0"
-screenshots = "0.5.3"
-png = "0.17.8"
-
-[target.'cfg(windows)'.dependencies]
-winapi = { version = "0.3", features = [
- "winuser",
- "wingdi",
- "winnt",
- "securitybaseapi",
- "libloaderapi",
-] }
-
-[target.'cfg(macos)'.dependencies]
-core-graphics = "0.22.3"
-core-foundation = "0.9.3"
-cocoa = "0.24.1"
-
-[build-dependencies]
-winres = "0.1"
+[workspace]
+resolver = "2"
+members = [
+ "yas",
+ "yas-genshin",
+ "yas-starrail",
+ "yas-derive"
+]
[profile.release]
lto = true
panic = "abort"
strip = true
-
-[[bin]]
-name = "yas_scanner"
-path = "src/main.rs"
-
-[[bin]]
-name = "yas_scanner_starrail"
-path = "src/main_starrail.rs"
\ No newline at end of file
diff --git a/README.md b/README.md
index 0fefbcdd..2f836ce0 100644
--- a/README.md
+++ b/README.md
@@ -1,73 +1,94 @@
# Yas
-Yet Another Genshin Impact Scanner
+
+Yet Another Genshin Impact Scanner
又一个原神圣遗物导出器
## 介绍
-基于SVTR(基本上是MobileNetV3_Small + Transformer)字符识别模型,使用原神字体对原神中会出现的字符串进行训练,达到更高的速度和更精确的结果。相比CRNN,SVTR可以达到更小的体积及更好的识别率
-导出结果可以导入分析工具(例如 [莫娜占卜铺](https://mona-uranai.com/) )进行配装或者其他计算
-由于使用了 [Rust](https://www.rust-lang.org/) 进行编写,运行效率和文件体积都得到了很大的提升
+
+基于 SVTR(基本上是 MobileNetV3_Small + Transformer)字符识别模型,使用原神字体对原神中会出现的字符串进行训练,达到更高的速度和更精确的结果。相比 CRNN,SVTR 可以达到更小的体积及更好的识别率
+导出结果可以导入分析工具(例如 [莫娜占卜铺](https://mona-uranai.com/) )进行配装或者其他计算
+由于使用了 [Rust](https://www.rust-lang.org/) 进行编写,运行效率和文件体积都得到了很大的提升
+
### 相关资料
+
- [MobileNetV3](https://arxiv.org/pdf/1905.02244.pdf)
- [CRNN](https://arxiv.org/pdf/1507.05717.pdf)
- [SVTR](https://arxiv.org/pdf/2205.00159.pdf)
- [Transformer](https://proceedings.neurips.cc/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)
### 识别模型
-SVTR原文使用了多个Local/Global Mixing,其中Global Mixing就是Transformer层,而根据*PaddleOCR*的代码,其SVTR识别模型也并未完全遵照SVTR原模型,而是骨干网络 + Transformer的结构
-*Yas*同样采用PaddleOCR的做法,即MobileNetV3_Small + Global Mixing,相当于将原RNN替换为Transformer。
+
+SVTR 原文使用了多个 Local/Global Mixing,其中 Global Mixing 就是 Transformer 层,而根据*PaddleOCR*的代码,其 SVTR 识别模型也并未完全遵照 SVTR 原模型,而是骨干网络 + Transformer 的结构
+*Yas*同样采用 PaddleOCR 的做法,即 MobileNetV3_Small + Global Mixing,相当于将原 RNN 替换为 Transformer。
## 使用
+
### Windows
+
- 打开原神,并切换到背包页面,将背包拉到最上面
-- 下载单exe可执行文件,右键管理员运行
+- 下载单 exe 可执行文件,右键管理员运行
- 扫描过程中,鼠标右键终止
+
### Linux
-- 首先请确保自己在x11下或者GNOME/Wayland下(其他wayland de下[会有很坏的性能](https://github.com/poly000/screenshots-rs/blob/d96dff76c5f5cbd849d80451f0df8f415f8e5f4b/src/linux/wayland_screenshot.rs#L109))
-- 用wine窗口化运行原神(或者全屏+虚拟桌面),打开圣遗物界面,拉到最顶
-- 启动yas
-- Alt+Tab切换到原神窗口,并且在鼠标变为十字后点击一下(还没做窗口聚焦),注意保证原神窗口整体在屏幕内
+
+- 首先请确保自己在 x11 下或者 GNOME/Wayland 下(其他 wayland de 下[会有很坏的性能](https://github.com/poly000/screenshots-rs/blob/d96dff76c5f5cbd849d80451f0df8f415f8e5f4b/src/linux/wayland_screenshot.rs#L109))
+- 用 wine 窗口化运行原神(或者全屏+虚拟桌面),打开圣遗物界面,拉到最顶
+- 启动 yas
+- Alt+Tab 切换到原神窗口,并且在鼠标变为十字后点击一下(还没做窗口聚焦),注意保证原神窗口整体在屏幕内
- 等待扫描结束。右键中止还没做
+
### 注意
-- 默认4星以下圣遗物不扫描
-- 不是所有窗口比例都支持,推荐16:9的分辨率(如1600x900, 1920x1080, 3840x2160)
+
+- 默认 4 星以下圣遗物不扫描
+- 不是所有窗口比例都支持,推荐 16:9 的分辨率(如 1600x900, 1920x1080, 3840x2160)
- 扫描过程中不要对鼠标做任何操作
-- 当前仅支持中文环境,若默认系统为非中文,请前往游戏设置界面修改Language为“简体中文”,否则无法读取原神窗口
+- 当前仅支持中文环境,若默认系统为非中文,请前往游戏设置界面修改 Language 为“简体中文”,否则无法读取原神窗口
- 当前仅支持键鼠作为控制设备,暂不支持手柄。
### 命令行使用
-假设你知道如何使用命令行工具
+
+假设你知道如何使用命令行工具
查看选项
+
```shell
yas --help
```
+
只扫描五星圣遗物
+
```shell
yas --min-star=5
```
+
只扫描一行
+
```shell
yas --max-row=1
```
## 编译
-在构建前,请确保安装`Git LFS`,并运行`git lfs pull`。否则[yas在运行时会使用错误的模型](https://github.com/wormtql/yas/pull/102#issuecomment-1375503803)。
+在构建前,请确保安装`Git LFS`,并运行`git lfs pull`。否则[yas 在运行时会使用错误的模型](https://github.com/wormtql/yas/pull/102#issuecomment-1375503803)。
```shell
-# Linux下需要首先安装rustup以及mingw-w64,然后再安装对应的rust target,
+# Linux 下需要首先安装 rustup 以及 mingw-w64 ,然后再安装对应的 rust target,
# 构建到Linux需要 `libxdo` 和 `libxcb`
rustup default stable
rustup target add x86_64-pc-windows-gnu
cargo build --release --locked --target=x86_64-pc-windows-gnu
```
+如果使用 macOS,为了保证正常捕捉窗口,需要在编译后运行 `codesign.sh` 对二进制文件进行签名
+
## 训练
+
[yas-train](https://github.com/wormtql/yas-train)
## 反馈
+
- Issue
-- QQ群:801106595
+- QQ 群:801106595
diff --git a/assets/app.entitlements b/assets/app.entitlements
new file mode 100644
index 00000000..6177c2bc
--- /dev/null
+++ b/assets/app.entitlements
@@ -0,0 +1,14 @@
+
+
+
+ com.apple.application-identifier
+ io.yas.scanner
+ com.apple.private.screencapture.allow
+
+ com.apple.private.tcc.allow
+
+ kTCCServiceScreenCapture
+ kTCCServiceAccessibility
+
+
+
diff --git a/manifest.xml b/assets/manifest.xml
similarity index 100%
rename from manifest.xml
rename to assets/manifest.xml
diff --git a/build.rs b/build.rs
deleted file mode 100644
index 42a7e95e..00000000
--- a/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-fn main() {
- if std::env::var("CARGO_CFG_TARGET_OS").unwrap().as_str() == "windows" {
- let mut res = winres::WindowsResource::new();
- res.set_manifest_file("manifest.xml");
- res.compile().unwrap();
- }
-}
diff --git a/codesign.sh b/codesign.sh
new file mode 100755
index 00000000..f34fa505
--- /dev/null
+++ b/codesign.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# This is bad, but post build scripts still not implemented yet for cargo
+# https://github.com/rust-lang/cargo/issues/545
+
+codesign -f -s - --timestamp=none --entitlements assets/app.entitlements ./target/*/yas_scanner*
diff --git a/models/index_2_word_starrail.json b/models/index_2_word_starrail.json
deleted file mode 100644
index 4ba5d4b8..00000000
--- a/models/index_2_word_starrail.json
+++ /dev/null
@@ -1,371 +0,0 @@
-{
- "0": "-",
- "1": " ",
- "2": "%",
- "3": "'",
- "4": "+",
- "5": ",",
- "6": ".",
- "7": "/",
- "8": "0",
- "9": "1",
- "10": "2",
- "11": "3",
- "12": "4",
- "13": "5",
- "14": "6",
- "15": "7",
- "16": "8",
- "17": "9",
- "18": "「",
- "19": "」",
- "20": "七",
- "21": "三",
- "22": "丝",
- "23": "中",
- "24": "丹",
- "25": "义",
- "26": "之",
- "27": "乐",
- "28": "云",
- "29": "亚",
- "30": "人",
- "31": "仙",
- "32": "伊",
- "33": "伤",
- "34": "伯",
- "35": "佩",
- "36": "使",
- "37": "信",
- "38": "修",
- "39": "值",
- "40": "假",
- "41": "偏",
- "42": "停",
- "43": "儿",
- "44": "元",
- "45": "光",
- "46": "克",
- "47": "兜",
- "48": "全",
- "49": "公",
- "50": "兰",
- "51": "军",
- "52": "冠",
- "53": "冥",
- "54": "冰",
- "55": "击",
- "56": "刃",
- "57": "利",
- "58": "制",
- "59": "刹",
- "60": "刺",
- "61": "力",
- "62": "加",
- "63": "动",
- "64": "包",
- "65": "匠",
- "66": "千",
- "67": "博",
- "68": "卡",
- "69": "卢",
- "70": "卫",
- "71": "卿",
- "72": "历",
- "73": "变",
- "74": "司",
- "75": "合",
- "76": "吸",
- "77": "呼",
- "78": "命",
- "79": "喙",
- "80": "器",
- "81": "围",
- "82": "图",
- "83": "土",
- "84": "圣",
- "85": "场",
- "86": "坼",
- "87": "垒",
- "88": "城",
- "89": "域",
- "90": "堡",
- "91": "塔",
- "92": "墨",
- "93": "士",
- "94": "壳",
- "95": "备",
- "96": "复",
- "97": "外",
- "98": "天",
- "99": "头",
- "100": "套",
- "101": "妮",
- "102": "妲",
- "103": "姬",
- "104": "娅",
- "105": "娜",
- "106": "子",
- "107": "孔",
- "108": "存",
- "109": "客",
- "110": "害",
- "111": "宽",
- "112": "密",
- "113": "射",
- "114": "小",
- "115": "尔",
- "116": "属",
- "117": "履",
- "118": "岛",
- "119": "岸",
- "120": "巡",
- "121": "巧",
- "122": "巨",
- "123": "已",
- "124": "市",
- "125": "布",
- "126": "希",
- "127": "帕",
- "128": "带",
- "129": "帽",
- "130": "序",
- "131": "废",
- "132": "度",
- "133": "建",
- "134": "引",
- "135": "弧",
- "136": "彦",
- "137": "御",
- "138": "德",
- "139": "快",
- "140": "性",
- "141": "怪",
- "142": "总",
- "143": "恒",
- "144": "恕",
- "145": "恢",
- "146": "息",
- "147": "感",
- "148": "成",
- "149": "戒",
- "150": "战",
- "151": "手",
- "152": "才",
- "153": "承",
- "154": "抗",
- "155": "护",
- "156": "披",
- "157": "抵",
- "158": "拉",
- "159": "拳",
- "160": "指",
- "161": "挎",
- "162": "捕",
- "163": "提",
- "164": "攻",
- "165": "效",
- "166": "数",
- "167": "旧",
- "168": "明",
- "169": "昏",
- "170": "易",
- "171": "星",
- "172": "春",
- "173": "晨",
- "174": "景",
- "175": "暴",
- "176": "月",
- "177": "服",
- "178": "木",
- "179": "机",
- "180": "束",
- "181": "杰",
- "182": "板",
- "183": "构",
- "184": "果",
- "185": "枝",
- "186": "枪",
- "187": "格",
- "188": "桑",
- "189": "械",
- "190": "楼",
- "191": "步",
- "192": "残",
- "193": "毡",
- "194": "沉",
- "195": "治",
- "196": "泰",
- "197": "洛",
- "198": "洲",
- "199": "流",
- "200": "浮",
- "201": "海",
- "202": "深",
- "203": "游",
- "204": "演",
- "205": "漠",
- "206": "漫",
- "207": "潜",
- "208": "火",
- "209": "炮",
- "210": "点",
- "211": "烈",
- "212": "燃",
- "213": "爪",
- "214": "物",
- "215": "特",
- "216": "狼",
- "217": "猎",
- "218": "率",
- "219": "王",
- "220": "环",
- "221": "球",
- "222": "理",
- "223": "瓦",
- "224": "生",
- "225": "甲",
- "226": "电",
- "227": "界",
- "228": "疗",
- "229": "白",
- "230": "百",
- "231": "的",
- "232": "皮",
- "233": "盔",
- "234": "盗",
- "235": "目",
- "236": "眼",
- "237": "短",
- "238": "破",
- "239": "磨",
- "240": "神",
- "241": "科",
- "242": "秩",
- "243": "移",
- "244": "穆",
- "245": "穗",
- "246": "空",
- "247": "站",
- "248": "端",
- "249": "簪",
- "250": "粗",
- "251": "素",
- "252": "索",
- "253": "纤",
- "254": "纹",
- "255": "线",
- "256": "终",
- "257": "绑",
- "258": "绒",
- "259": "绘",
- "260": "绣",
- "261": "绳",
- "262": "缆",
- "263": "罗",
- "264": "罩",
- "265": "羽",
- "266": "翁",
- "267": "翔",
- "268": "翼",
- "269": "耀",
- "270": "者",
- "271": "肃",
- "272": "肢",
- "273": "肩",
- "274": "胫",
- "275": "胸",
- "276": "能",
- "277": "腿",
- "278": "臂",
- "279": "舟",
- "280": "航",
- "281": "船",
- "282": "艾",
- "283": "芙",
- "284": "荒",
- "285": "莎",
- "286": "莳",
- "287": "萨",
- "288": "落",
- "289": "蔓",
- "290": "虎",
- "291": "虚",
- "292": "蜥",
- "293": "螺",
- "294": "衣",
- "295": "袍",
- "296": "裂",
- "297": "装",
- "298": "裙",
- "299": "裳",
- "300": "裸",
- "301": "誓",
- "302": "诞",
- "303": "贝",
- "304": "贴",
- "305": "贸",
- "306": "赛",
- "307": "超",
- "308": "跑",
- "309": "距",
- "310": "身",
- "311": "轨",
- "312": "软",
- "313": "过",
- "314": "迹",
- "315": "途",
- "316": "速",
- "317": "逢",
- "318": "道",
- "319": "遗",
- "320": "遥",
- "321": "部",
- "322": "酷",
- "323": "重",
- "324": "野",
- "325": "量",
- "326": "金",
- "327": "钉",
- "328": "钢",
- "329": "钩",
- "330": "铁",
- "331": "铆",
- "332": "铵",
- "333": "银",
- "334": "铸",
- "335": "镇",
- "336": "镜",
- "337": "镭",
- "338": "长",
- "339": "间",
- "340": "队",
- "341": "防",
- "342": "阳",
- "343": "阻",
- "344": "阿",
- "345": "雀",
- "346": "雪",
- "347": "雷",
- "348": "露",
- "349": "青",
- "350": "面",
- "351": "革",
- "352": "靴",
- "353": "鞋",
- "354": "鞲",
- "355": "须",
- "356": "频",
- "357": "风",
- "358": "马",
- "359": "驭",
- "360": "骑",
- "361": "高",
- "362": "鲸",
- "363": "鳞",
- "364": "鹰",
- "365": "鹿",
- "366": "黑",
- "367": "默",
- "368": "龙"
-}
\ No newline at end of file
diff --git a/models/model_training_starrail.onnx b/models/model_training_starrail.onnx
deleted file mode 100644
index 0b001b27..00000000
--- a/models/model_training_starrail.onnx
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6226ad47e62e49c8fabfb09db7439bf8099e77132096ef64aef5ba94961500b3
-size 4630951
diff --git a/src/artifact/mod.rs b/src/artifact/mod.rs
deleted file mode 100644
index 421697ed..00000000
--- a/src/artifact/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub mod internal_artifact;
-pub mod internal_relic;
diff --git a/src/capture/mod.rs b/src/capture/mod.rs
deleted file mode 100644
index 13daad87..00000000
--- a/src/capture/mod.rs
+++ /dev/null
@@ -1,87 +0,0 @@
-#[cfg(target_os = "macos")]
-use std::os::macos::raw;
-
-use image::{
- buffer::ConvertBuffer, imageops::resize, imageops::FilterType::Triangle, RgbImage, RgbaImage,
-};
-
-use crate::common::color::Color;
-use crate::common::PixelRect;
-
-use png::Decoder;
-
-/// retures Ok(buf) on success
-/// buf contains pixels in [b:u8, g:u8, r:u8, a:u8] format, as an `[[i32;width];height]`.
-pub fn capture_absolute(
- PixelRect {
- left,
- top,
- width,
- height,
- }: &PixelRect,
-) -> Result {
- let screen = screenshots::Screen::all().expect("cannot get DisplayInfo")[0];
- let png_img = screen
- .capture_area(*left, *top, *width as u32, *height as u32)
- .expect("capture failed");
- let mut rgb_img = png_decode(png_img).unwrap();
- if rgb_img.width() as i32 > *width && rgb_img.height() as i32 > *height {
- rgb_img = resize(&rgb_img, (*width) as u32, (*height) as u32, Triangle);
- }
- Ok(rgb_img)
-}
-
-fn png_decode(png_img: screenshots::Image) -> Result {
- let png_decoder = Decoder::new(png_img.buffer().as_slice());
- let mut png_reader = png_decoder.read_info().unwrap();
-
- let mut png_data_buf = vec![0; png_reader.output_buffer_size()];
-
- let info = png_reader.next_frame(&mut png_data_buf).unwrap();
-
- assert!(
- info.color_type == png::ColorType::Rgba,
- "Not rgba format image"
- );
-
- let _buffer = png_data_buf[..info.buffer_size()].to_vec();
-
- let rgba_img = RgbaImage::from_raw(png_img.width(), png_img.height(), png_data_buf).unwrap();
- let rgb_img: RgbImage = rgba_img.convert();
- Ok(rgb_img)
-}
-
-pub fn capture_absolute_image(
- PixelRect {
- left,
- top,
- width,
- height,
- }: &PixelRect,
-) -> Result {
- // simply use the first screen.
- // todo: multi-screen support
- let screen = screenshots::Screen::all().expect("cannot get DisplayInfo")[0];
- let image = screen
- .capture_area(*left, *top, *width as u32, *height as u32)
- .expect("capture failed");
-
- let mut buffer = png_decode(image).unwrap();
-
- if buffer.width() as i32 > *width && buffer.height() as i32 > *height {
- buffer = resize(&buffer, (*width) as u32, (*height) as u32, Triangle);
- }
- Ok(buffer)
-}
-
-pub fn get_color(x: u32, y: u32) -> Color {
- let im = capture_absolute(&PixelRect {
- left: x as i32,
- top: y as i32,
- width: 1,
- height: 1,
- })
- .unwrap();
- let pixel = im.get_pixel(0, 0);
- Color::from(pixel[0], pixel[1], pixel[2])
-}
diff --git a/src/common/buffer.rs b/src/common/buffer.rs
deleted file mode 100644
index adf44d3b..00000000
--- a/src/common/buffer.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-pub struct Buffer {
- pub data: Vec>,
-}
-
-impl Buffer {
- fn new_zeroed(width: usize, height: usize) -> Buffer {
- Buffer {
- data: vec![vec![0.0; width]; height],
- }
- }
-}
diff --git a/src/common/color.rs b/src/common/color.rs
deleted file mode 100644
index 511fdae8..00000000
--- a/src/common/color.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-#[derive(Debug)]
-pub struct Color(pub u8, pub u8, pub u8);
-
-impl Color {
- pub fn is_same(&self, other: &Color) -> bool {
- let dis = self.dis_2(other);
-
- dis < 20
- }
-
- pub fn dis_2(&self, other: &Color) -> u32 {
- let dis = (self.0 as i32 - other.0 as i32) * (self.0 as i32 - other.0 as i32)
- + (self.1 as i32 - other.1 as i32) * (self.1 as i32 - other.1 as i32)
- + (self.2 as i32 - other.2 as i32) * (self.2 as i32 - other.2 as i32);
- dis as u32
- }
-
- pub fn new() -> Color {
- Color(0, 0, 0)
- }
-
- pub fn from(r: u8, g: u8, b: u8) -> Color {
- Color(r, g, b)
- }
-}
diff --git a/src/common/mod.rs b/src/common/mod.rs
deleted file mode 100644
index 4e4eb833..00000000
--- a/src/common/mod.rs
+++ /dev/null
@@ -1,185 +0,0 @@
-use crate::capture;
-use crate::inference::pre_process::{
- pre_process, raw_to_img, to_gray, uint8_raw_to_img, GrayImageFloat,
-};
-use crate::info::info::ScanInfo;
-use image::{GrayImage, ImageBuffer, RgbImage};
-use log::info;
-use std::time::SystemTime;
-
-pub mod buffer;
-pub mod character_name;
-pub mod color;
-pub mod utils;
-
-#[derive(Debug)]
-pub struct PixelRect {
- pub left: i32,
- pub top: i32,
- pub width: i32,
- pub height: i32,
-}
-
-impl PixelRect {
- pub fn scale(&mut self, ratio: f64) {
- self.left = (self.left as f64 * ratio).round() as i32;
- self.top = (self.top as f64 * ratio).round() as i32;
- self.width = (self.width as f64 * ratio).round() as i32;
- self.height = (self.height as f64 * ratio).round() as i32;
- }
-}
-
-#[derive(Clone, Debug)]
-pub struct PixelRectBound {
- pub left: i32,
- pub top: i32,
- pub right: i32,
- pub bottom: i32,
-}
-
-impl PixelRectBound {
- pub fn capture_absolute(&self) -> Result {
- let w = self.right - self.left;
- let h = self.bottom - self.top;
- let rect = PixelRect {
- left: self.left,
- top: self.top,
- width: w,
- height: h,
- };
- let raw_u8 = capture::capture_absolute(&rect).unwrap();
- let raw_gray = to_gray(&raw_u8);
- let raw_after_pp = pre_process(raw_gray);
-
- match raw_after_pp {
- Some(im) => Ok(im),
- None => Err(String::from("capture error")),
- }
- }
-
- pub fn capture_relative(
- &self,
- left: i32,
- top: i32,
- use_pre_process: bool,
- ) -> Result {
- let w = self.right - self.left;
- let h = self.bottom - self.top;
- let rect = PixelRect {
- left: self.left + left,
- top: self.top + top,
- width: w,
- height: h,
- };
- let now = SystemTime::now();
- let raw_u8 = capture::capture_absolute(&rect).unwrap();
- info!("capture raw time: {}ms", now.elapsed().unwrap().as_millis());
- let raw_gray = to_gray(&raw_u8);
- let raw_after_pp = if use_pre_process {
- pre_process(raw_gray)
- } else {
- Some(raw_gray)
- };
-
- info!("preprocess time: {}ms", now.elapsed().unwrap().as_millis());
-
- match raw_after_pp {
- Some(im) => Ok(im),
- None => Err(String::from("capture error")),
- }
- }
-
- pub fn capture_relative_image(&self, left: i32, top: i32) -> Result {
- let w = self.right - self.left;
- let h = self.bottom - self.top;
- let rect = PixelRect {
- left: self.left + left,
- top: self.top + top,
- width: w,
- height: h,
- };
-
- capture::capture_absolute_image(&rect)
- }
-}
-
-pub struct RawImage {
- pub data: Vec,
- pub w: u32,
- pub h: u32,
-}
-
-pub struct RawCaptureImage {
- pub data: Vec,
- pub w: u32,
- pub h: u32,
-}
-
-impl RawImage {
- pub fn to_gray_image(&self) -> GrayImage {
- raw_to_img(&self)
- }
-
- pub fn grayscale_to_gray_image(&self) -> GrayImage {
- uint8_raw_to_img(&self)
- }
-}
-
-impl RawCaptureImage {
- pub fn save(&self, path: &str) {
- let width = self.w;
- let height = self.h;
- let data = &self.data;
-
- let img = ImageBuffer::from_fn(width, height, |x, y| {
- let index = (y * self.w + x) as usize;
-
- let b = data[index * 4];
- let g = data[index * 4 + 1];
- let r = data[index * 4 + 2];
-
- image::Rgb([r, g, b])
- // image::Luma([pixel])
- });
-
- img.save(path).unwrap();
- }
-
- pub fn crop_to_raw_img(&self, rect: &PixelRect) -> RawImage {
- // let now = SystemTime::now();
- let vol = rect.width * rect.height;
- let mut data = vec![0.0; vol as usize];
- for i in rect.left..rect.left + rect.width {
- for j in rect.top..rect.top + rect.height {
- let x = i;
- let y = j;
- let b: u8 = self.data[((y * self.w as i32 + x) * 4) as usize];
- let g: u8 = self.data[((y * self.w as i32 + x) * 4 + 1) as usize];
- let r: u8 = self.data[((y * self.w as i32 + x) * 4 + 2) as usize];
-
- let gray = r as f32 * 0.2989 + g as f32 * 0.5870 + b as f32 * 0.1140;
- let new_index = ((j - rect.top) * rect.width + i - rect.left) as usize;
- data[new_index] = gray;
- }
- }
-
- let im = RawImage {
- data,
- w: rect.width as u32,
- h: rect.height as u32,
- };
- // let im = pre_process(im);
- // No preprocess!
-
- // info!("preprocess time: {}ms", now.elapsed().unwrap().as_millis());
- // im.to_gray_image().save("test.png");
- im
- }
-}
-
-// pub struct
-
-pub enum UI {
- Desktop,
- Mobile,
-}
diff --git a/src/common/utils.rs b/src/common/utils.rs
deleted file mode 100644
index 6b525ecc..00000000
--- a/src/common/utils.rs
+++ /dev/null
@@ -1,74 +0,0 @@
-use std::fs;
-use std::io::stdin;
-use std::process;
-use std::thread;
-use std::time::Duration;
-
-use log::error;
-use reqwest::blocking::Client;
-use reqwest::header::{HeaderValue, USER_AGENT};
-
-#[cfg(target_os = "macos")]
-pub use mac::*;
-#[cfg(windows)]
-pub use windows::*;
-
-use crate::dto::GithubTag;
-
-#[cfg(target_os = "macos")]
-mod mac;
-#[cfg(windows)]
-mod windows;
-
-pub fn sleep(ms: u32) {
- let time = Duration::from_millis(ms as u64);
- thread::sleep(time);
-}
-
-pub fn read_file_to_string(path: String) -> String {
- let content = fs::read_to_string(path).unwrap();
- content
-}
-
-pub fn error_and_quit(msg: &str) -> ! {
- error!("{}, 按Enter退出", msg);
- let mut s: String = String::new();
- stdin().read_line(&mut s).unwrap();
- process::exit(0);
-}
-
-#[cfg(not(windows))]
-pub fn is_rmb_down() -> bool {
- false
-}
-
-pub const VERSION: &str = env!("CARGO_PKG_VERSION");
-
-pub fn check_update() -> Option {
- let client = Client::new();
-
- let resp = client
- .get("https://api.github.com/repos/wormtql/yas/tags")
- .timeout(Duration::from_secs(5))
- .header(USER_AGENT, HeaderValue::from_static("reqwest"))
- .send()
- .ok()?
- .json::>()
- .ok()?;
-
- let latest = if resp.len() == 0 {
- return None;
- } else {
- resp[0].name.clone()
- };
- let latest = &latest[1..];
-
- let latest_sem: semver::Version = semver::Version::parse(&latest).unwrap();
- let current_sem: semver::Version = semver::Version::parse(VERSION).unwrap();
-
- if latest_sem > current_sem {
- Some(String::from(latest))
- } else {
- None
- }
-}
diff --git a/src/dto/mod.rs b/src/dto/mod.rs
deleted file mode 100644
index d96041a6..00000000
--- a/src/dto/mod.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-use serde::Deserialize;
-
-#[derive(Deserialize)]
-pub struct GithubTag {
- pub name: String,
-}
diff --git a/src/expo/mod.rs b/src/expo/mod.rs
deleted file mode 100644
index 17bcaa13..00000000
--- a/src/expo/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-pub mod good;
-pub mod mingyu_lab;
-pub mod mona_uranai;
-pub mod march7th;
diff --git a/src/inference/mod.rs b/src/inference/mod.rs
deleted file mode 100644
index 4ba6e9f2..00000000
--- a/src/inference/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub mod inference;
-pub mod pre_process;
diff --git a/src/info/info.rs b/src/info/info.rs
deleted file mode 100644
index e931b1e2..00000000
--- a/src/info/info.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-use crate::common::{PixelRect, PixelRectBound};
-use crate::info::window_info::{
- WINDOW_16_9, WINDOW_43_18, WINDOW_4_3, WINDOW_7_3, WINDOW_8_5, WINDOW_MAC_8_5,
-};
-
-#[derive(Clone, Debug)]
-pub struct ScanInfo {
- // pub panel_height: u32,
- // pub panel_width: u32,
-
- // pub panel_position: PixelRectBound,
- pub title_position: PixelRectBound,
- pub main_stat_name_position: PixelRectBound,
- pub main_stat_value_position: PixelRectBound,
- pub level_position: PixelRectBound,
- pub panel_position: PixelRectBound,
-
- pub sub_stat1_position: PixelRectBound,
- pub sub_stat2_position: PixelRectBound,
- pub sub_stat3_position: PixelRectBound,
- pub sub_stat4_position: PixelRectBound,
-
- pub equip_position: PixelRectBound,
- pub art_count_position: PixelRectBound,
-
- pub art_width: u32,
- pub art_height: u32,
- pub art_gap_x: u32,
- pub art_gap_y: u32,
-
- pub art_row: u32,
- pub art_col: u32,
-
- pub left_margin: u32,
- pub top_margin: u32,
-
- pub width: u32,
- pub height: u32,
- pub left: i32,
- pub top: i32,
-
- pub flag_x: u32,
- pub flag_y: u32,
-
- pub star_x: u32,
- pub star_y: u32,
-
- pub pool_position: PixelRectBound,
-}
-
-impl ScanInfo {
- pub fn from_pc(width: u32, height: u32, left: i32, top: i32) -> ScanInfo {
- if height * 43 == width * 18 {
- WINDOW_43_18.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 16 == width * 9 {
- WINDOW_16_9.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 8 == width * 5 {
- WINDOW_8_5.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 4 == width * 3 {
- WINDOW_4_3.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 7 == width * 3 {
- WINDOW_7_3.to_scan_info(height as f64, width as f64, left, top)
- } else {
- // 不支持的分辨率
- panic!("不支持的分辨率");
- }
- }
- pub fn from_mobile(width: u32, height: u32, left: i32, top: i32) -> ScanInfo {
- if (height as i32 * 8 - width as i32 * 5).abs() < 20 {
- // 窗口状态下的playcover分辨率长宽无法整除
- WINDOW_MAC_8_5.to_scan_info(height as f64, width as f64, left, top)
- } else {
- // 不支持的分辨率
- panic!("不支持的分辨率");
- }
- }
-}
diff --git a/src/info/info_starrail.rs b/src/info/info_starrail.rs
deleted file mode 100644
index a0cf4d39..00000000
--- a/src/info/info_starrail.rs
+++ /dev/null
@@ -1,81 +0,0 @@
-use crate::common::{PixelRect, PixelRectBound};
-use crate::info::window_info_starrail::{
- WINDOW_43_18, WINDOW_16_9, WINDOW_8_5, WINDOW_4_3, WINDOW_7_3, WINDOW_MAC_8_5
-};
-
-#[derive(Clone, Debug)]
-pub struct ScanInfoStarRail {
- // pub panel_height: u32,
- // pub panel_width: u32,
-
- // pub panel_position: PixelRectBound,
- pub title_position: PixelRectBound,
- pub main_stat_name_position: PixelRectBound,
- pub main_stat_value_position: PixelRectBound,
- pub level_position: PixelRectBound,
- pub panel_position: PixelRectBound,
-
- pub sub_stat1_name_pos: PixelRectBound,
- pub sub_stat1_value_pos: PixelRectBound,
- pub sub_stat2_name_pos: PixelRectBound,
- pub sub_stat2_value_pos: PixelRectBound,
- pub sub_stat3_name_pos: PixelRectBound,
- pub sub_stat3_value_pos: PixelRectBound,
- pub sub_stat4_name_pos: PixelRectBound,
- pub sub_stat4_value_pos: PixelRectBound,
-
- pub equip_position: PixelRectBound,
- pub art_count_position: PixelRectBound,
-
- pub art_width: u32,
- pub art_height: u32,
- pub art_gap_x: u32,
- pub art_gap_y: u32,
-
- pub art_row: u32,
- pub art_col: u32,
-
- pub left_margin: u32,
- pub top_margin: u32,
-
- pub width: u32,
- pub height: u32,
- pub left: i32,
- pub top: i32,
-
- pub flag_x: u32,
- pub flag_y: u32,
-
- pub star_x: u32,
- pub star_y: u32,
-
- pub pool_position: PixelRectBound,
-}
-
-impl ScanInfoStarRail {
- pub fn from_pc(width: u32, height: u32, left: i32, top: i32) -> ScanInfoStarRail {
- if height * 43 == width * 18 {
- WINDOW_43_18.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 16 == width * 9 {
- WINDOW_16_9.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 8 == width * 5 {
- WINDOW_8_5.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 4 == width * 3 {
- WINDOW_4_3.to_scan_info(height as f64, width as f64, left, top)
- } else if height * 7 == width * 3 {
- WINDOW_7_3.to_scan_info(height as f64, width as f64, left, top)
- } else {
- // 不支持的分辨率
- panic!("不支持的分辨率");
- }
- }
- pub fn from_mobile(width: u32, height: u32, left: i32, top: i32) -> ScanInfoStarRail {
- if (height as i32 * 8 - width as i32 * 5).abs() < 20 {
- // 窗口状态下的playcover分辨率长宽无法整除
- WINDOW_MAC_8_5.to_scan_info(height as f64, width as f64, left, top)
- } else {
- // 不支持的分辨率
- panic!("不支持的分辨率");
- }
- }
-}
diff --git a/src/info/mod.rs b/src/info/mod.rs
deleted file mode 100644
index 26878aca..00000000
--- a/src/info/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-pub mod info;
-pub mod info_starrail;
-pub mod window_info;
-pub mod window_info_starrail;
diff --git a/src/info/window_info.rs b/src/info/window_info.rs
deleted file mode 100644
index b87023db..00000000
--- a/src/info/window_info.rs
+++ /dev/null
@@ -1,296 +0,0 @@
-use crate::common::PixelRectBound;
-use crate::info::info::ScanInfo;
-
-pub struct Rect(f64, f64, f64, f64); // top, right, bottom, left
-
-pub struct WindowInfo {
- pub width: f64,
- pub height: f64,
-
- pub title_pos: Rect,
- pub main_stat_name_pos: Rect,
- pub main_stat_value_pos: Rect,
- pub level_pos: Rect,
- pub panel_pos: Rect,
-
- pub sub_stat1_pos: Rect,
- pub sub_stat2_pos: Rect,
- pub sub_stat3_pos: Rect,
- pub sub_stat4_pos: Rect,
-
- pub equip_pos: Rect,
- pub art_count_pos: Rect,
-
- pub art_width: f64,
- pub art_height: f64,
- pub art_gap_x: f64,
- pub art_gap_y: f64,
-
- pub art_row: usize,
- pub art_col: usize,
-
- pub left_margin: f64,
- pub top_margin: f64,
-
- pub flag_x: f64,
- pub flag_y: f64,
-
- pub star_x: f64,
- pub star_y: f64,
-
- pub pool_pos: Rect,
-}
-
-impl WindowInfo {
- pub fn to_scan_info(&self, h: f64, w: f64, left: i32, top: i32) -> ScanInfo {
- let convert_rect = |rect: &Rect| {
- let top = rect.0 / self.height * h;
- let right = rect.1 / self.width * w;
- let bottom = rect.2 / self.height * h;
- let left = rect.3 / self.width * w;
-
- PixelRectBound {
- left: left as i32,
- top: top as i32,
- right: right as i32,
- bottom: bottom as i32,
- }
- };
-
- let convert_x = |x: f64| x / self.width * w;
-
- let convert_y = |y: f64| y / self.height * h;
-
- ScanInfo {
- title_position: convert_rect(&self.title_pos),
- main_stat_name_position: convert_rect(&self.main_stat_name_pos),
- main_stat_value_position: convert_rect(&self.main_stat_value_pos),
- level_position: convert_rect(&self.level_pos),
- panel_position: convert_rect(&self.panel_pos),
- sub_stat1_position: convert_rect(&self.sub_stat1_pos),
- sub_stat2_position: convert_rect(&self.sub_stat2_pos),
- sub_stat3_position: convert_rect(&self.sub_stat3_pos),
- sub_stat4_position: convert_rect(&self.sub_stat4_pos),
- equip_position: convert_rect(&self.equip_pos),
- art_count_position: convert_rect(&self.art_count_pos),
- art_width: convert_x(self.art_width) as u32,
- art_height: convert_y(self.art_height) as u32,
- art_gap_x: convert_x(self.art_gap_x) as u32,
- art_gap_y: convert_y(self.art_gap_y) as u32,
- art_row: self.art_row as u32,
- art_col: self.art_col as u32,
- left_margin: convert_x(self.left_margin) as u32,
- top_margin: convert_y(self.top_margin) as u32,
- width: w as u32,
- height: h as u32,
- left,
- top,
- flag_x: convert_x(self.flag_x) as u32,
- flag_y: convert_y(self.flag_y) as u32,
- star_x: convert_x(self.star_x) as u32,
- star_y: convert_y(self.star_y) as u32,
- pool_position: convert_rect(&self.pool_pos),
- }
- }
-}
-
-pub const WINDOW_43_18: WindowInfo = WindowInfo {
- width: 3440.0,
- height: 1440.0,
-
- title_pos: Rect(170.0, 3140.0, 220.0, 2560.0),
- main_stat_name_pos: Rect(360.0, 2850.0, 400.0, 2560.0),
- main_stat_value_pos: Rect(400.0, 2850.0, 460.0, 2560.0),
- level_pos: Rect(575.0, 2640.0, 605.0, 2568.0),
- panel_pos: Rect(160.0, 3185.0, 1280.0, 2528.0),
-
- sub_stat1_pos: Rect(640.0, 3080.0, 680.0, 2590.0),
- sub_stat2_pos: Rect(690.0, 3080.0, 730.0, 2590.0),
- sub_stat3_pos: Rect(742.0, 3080.0, 782.0, 2590.0),
- sub_stat4_pos: Rect(795.0, 3080.0, 835.0, 2590.0),
-
- equip_pos: Rect(1220.0, 5630.0, 1260.0, 3140.0),
- art_count_pos: Rect(50.0, 3185.0, 85.0, 2750.0),
-
- art_width: 2421.0 - 2257.0,
- art_height: 598.0 - 394.0,
- art_gap_x: 2257.0 - 2225.0,
- art_gap_y: 394.0 - 363.0,
-
- art_row: 5,
- art_col: 11,
-
- left_margin: 305.0,
- top_margin: 161.0,
-
- flag_x: 580.0,
- flag_y: 145.0,
-
- star_x: 3130.0,
- star_y: 200.0,
-
- pool_pos: Rect(170.0, 2610.0 + 30.0, 900.0, 2610.0),
-};
-
-pub const WINDOW_7_3: WindowInfo = WindowInfo {
- width: 2100.0,
- height: 900.0,
-
- title_pos: Rect(106.6, 1800.0, 139.6, 1550.0),
- main_stat_name_pos: Rect(224.3, 1690.0, 248.0, 1550.0),
- main_stat_value_pos: Rect(248.4, 1690.0, 286.8, 1550.0),
- level_pos: Rect(360.0, 1600.0, 378.0, 1557.0),
- panel_pos: Rect(100.0, 1941.0, 800.0, 1531.0),
-
- sub_stat1_pos: Rect(398.1, 1780.0, 427.3, 1570.0),
- sub_stat2_pos: Rect(427.3, 1780.0, 458.2, 1570.0),
- sub_stat3_pos: Rect(458.2, 1780.0, 490.9, 1570.0),
- sub_stat4_pos: Rect(490.9, 1780.0, 523.0, 1570.0),
-
- equip_pos: Rect(762.6, 1850.0, 787.8, 1598.0),
- art_count_pos: Rect(27.1, 1945.0, 52.9, 1785.0),
-
- art_width: 1055.0 - 953.0,
- art_height: 373.0 - 247.0,
- art_gap_x: 953.0 - 933.0,
- art_gap_y: 247.0 - 227.0,
-
- art_row: 5,
- art_col: 11,
-
- left_margin: 166.0,
- top_margin: 101.0,
-
- flag_x: 340.0,
- flag_y: 89.8,
-
- star_x: 1900.0,
- star_y: 123.9,
- pool_pos: Rect(118.2, 1584.0 + 15.0, 510.3, 1584.0),
-};
-
-pub const WINDOW_16_9: WindowInfo = WindowInfo {
- width: 1600.0,
- height: 900.0,
-
- title_pos: Rect(106.6, 1417.7, 139.6, 1111.8),
- main_stat_name_pos: Rect(224.3, 1253.9, 248.0, 1110.0),
- main_stat_value_pos: Rect(248.4, 1246.8, 286.8, 1110.0),
- level_pos: Rect(360.0, 1160.0, 378.0, 1117.0),
- panel_pos: Rect(100.0, 1500.0, 800.0, 1090.0),
-
- sub_stat1_pos: Rect(398.1, 1343.0, 427.3, 1130.2),
- sub_stat2_pos: Rect(427.3, 1343.0, 458.2, 1130.2),
- sub_stat3_pos: Rect(458.2, 1343.0, 490.9, 1130.2),
- sub_stat4_pos: Rect(490.9, 1343.0, 523.0, 1130.2),
-
- equip_pos: Rect(762.6, 1389.4, 787.8, 1154.9),
- art_count_pos: Rect(27.1, 1504.7, 52.9, 1314.9),
-
- art_width: 1055.0 - 953.0,
- art_height: 373.0 - 247.0,
- art_gap_x: 953.0 - 933.0,
- art_gap_y: 247.0 - 227.0,
-
- art_row: 5,
- art_col: 8,
-
- left_margin: 99.0,
- top_margin: 101.0,
-
- flag_x: 271.1,
- flag_y: 89.8,
-
- star_x: 1469.4,
- star_y: 123.9,
-
- pool_pos: Rect(118.2, 1144.7 + 15.0, 510.3, 1144.7),
-};
-
-pub const WINDOW_8_5: WindowInfo = WindowInfo {
- width: 1440.0,
- height: 900.0,
- title_pos: Rect(96.0, 1268.9, 126.1, 1000.9),
- main_stat_name_pos: Rect(201.6, 1128.1, 223.9, 1000.3),
- main_stat_value_pos: Rect(225.5, 1128.1, 262.8, 1000.3),
- level_pos: Rect(324.0, 1043.0, 340.0, 1006.0),
- panel_pos: Rect(90.0, 1350.0, 810.0, 981.0),
- sub_stat1_pos: Rect(358.0, 1224.1, 384.1, 1016.2),
- sub_stat2_pos: Rect(384.1, 1224.1, 412.6, 1016.2),
- sub_stat3_pos: Rect(412.6, 1224.1, 440.5, 1016.2),
- sub_stat4_pos: Rect(440.5, 1224.1, 467.1, 1016.2),
- equip_pos: Rect(776.0, 1247.3, 800.6, 1041.3),
- art_count_pos: Rect(25.0, 1353.1, 46.8, 1182.8),
- art_width: 950.0 - 857.0,
- art_height: 204.0 - 91.0,
- art_gap_x: 857.0 - 840.0,
- art_gap_y: 222.0 - 204.0,
- art_row: 6,
- art_col: 8,
- left_margin: 89.0,
- top_margin: 91.0,
- flag_x: 245.9,
- flag_y: 82.1,
- star_x: 1321.3,
- star_y: 111.3,
- pool_pos: Rect(103.6, 1025.8 + 15.0, 460.7, 1028.5),
-};
-
-pub const WINDOW_4_3: WindowInfo = WindowInfo {
- width: 1280.0,
- height: 960.0,
- title_pos: Rect(85.0, 1094.8, 111.7, 889.5),
- main_stat_name_pos: Rect(181.0, 998.0, 199.8, 889.5),
- main_stat_value_pos: Rect(199.8, 998.0, 233.4, 889.5),
- level_pos: Rect(288.0, 927.0, 302.0, 894.0),
- panel_pos: Rect(80.0, 1200.0, 880.0, 872.0),
- sub_stat1_pos: Rect(318.2, 1100.5, 342.3, 904.3),
- sub_stat2_pos: Rect(342.3, 1100.5, 369.4, 904.3),
- sub_stat3_pos: Rect(369.4, 1100.5, 395.3, 904.3),
- sub_stat4_pos: Rect(395.3, 1100.5, 420.6, 904.3),
- equip_pos: Rect(849.8, 1090.8, 870.1, 924.4),
- art_count_pos: Rect(22.9, 1202.3, 41.4, 1058.6),
- art_width: 844.0 - 762.0,
- art_height: 182.0 - 81.0,
- art_gap_x: 762.0 - 747.0,
- art_gap_y: 197.0 - 182.0,
- art_row: 7,
- art_col: 8,
- left_margin: 79.0,
- top_margin: 81.0,
- flag_x: 218.1,
- flag_y: 72.1,
- star_x: 1175.4,
- star_y: 95.8,
- pool_pos: Rect(93.2, 912.7 + 15.0, 412.4, 912.7),
-};
-
-//top, right, bottom, left
-pub const WINDOW_MAC_8_5: WindowInfo = WindowInfo {
- width: 1164.0,
- height: 755.0 - 28.,
- title_pos: Rect(122.0 - 28., 1090.0, 157.0 - 28., 770.0),
- main_stat_name_pos: Rect(230. - 28., 925., 254. - 28., 765.),
- main_stat_value_pos: Rect(253. - 28., 911., 294. - 28., 767.),
- level_pos: Rect(353. - 28., 813., 372. - 28., 781.),
- panel_pos: Rect(117. - 28., 1127., 666. - 28., 756.),
- sub_stat1_pos: Rect(387. - 28., 1050., 417. - 28., 791.),
- sub_stat2_pos: Rect(417. - 28., 1050., 446. - 28., 791.),
- sub_stat3_pos: Rect(446. - 28., 1050., 475. - 28., 791.),
- sub_stat4_pos: Rect(475. - 28., 1050., 504. - 28., 791.),
- equip_pos: Rect(627. - 28., 1090., 659. - 28., 815.),
- art_count_pos: Rect(51. - 28., 1076., 80. - 28., 924.),
- art_width: 250. - 155.,
- art_height: 234. - 118.,
- art_gap_x: 266. - 250.,
- art_gap_y: 250. - 234.,
- art_row: 4,
- art_col: 5,
- left_margin: 155.,
- top_margin: 118. - 28.,
- flag_x: 170., //检测颜色出现重复,则判定换行完成
- flag_y: 223. - 28.,
- star_x: 1060.,
- star_y: 140. - 28.,
- pool_pos: Rect(390. - 28., 1010., 504. - 28., 792.), //检测平均颜色是否相同,判断圣遗物有没有切换
-};
diff --git a/src/info/window_info_starrail.rs b/src/info/window_info_starrail.rs
deleted file mode 100644
index ae19539a..00000000
--- a/src/info/window_info_starrail.rs
+++ /dev/null
@@ -1,335 +0,0 @@
-use crate::common::PixelRectBound;
-use crate::info::info_starrail::ScanInfoStarRail;
-
-pub struct Rect(f64, f64, f64, f64); // top, right, bottom, left
-
-pub struct WindowInfoStarRail {
- pub width: f64,
- pub height: f64,
-
- pub title_pos: Rect,
- pub main_stat_name_pos: Rect,
- pub main_stat_value_pos: Rect,
- pub level_pos: Rect,
- pub panel_pos: Rect,
-
- pub sub_stat1_name_pos: Rect,
- pub sub_stat1_value_pos: Rect,
- pub sub_stat2_name_pos: Rect,
- pub sub_stat2_value_pos: Rect,
- pub sub_stat3_name_pos: Rect,
- pub sub_stat3_value_pos: Rect,
- pub sub_stat4_name_pos: Rect,
- pub sub_stat4_value_pos: Rect,
-
- pub equip_pos: Rect,
- pub art_count_pos: Rect,
-
- pub art_width: f64,
- pub art_height: f64,
- pub art_gap_x: f64,
- pub art_gap_y: f64,
-
- pub art_row: usize,
- pub art_col: usize,
-
- pub left_margin: f64,
- pub top_margin: f64,
-
- pub flag_x: f64,
- pub flag_y: f64,
-
- pub star_x: f64,
- pub star_y: f64,
-
- pub pool_pos: Rect,
-}
-
-impl WindowInfoStarRail {
- pub fn to_scan_info(&self, h: f64, w: f64, left: i32, top: i32) -> ScanInfoStarRail {
- let convert_rect = |rect: &Rect| {
- let top = rect.0 / self.height * h;
- let right = rect.1 / self.width * w;
- let bottom = rect.2 / self.height * h;
- let left = rect.3 / self.width * w;
-
- PixelRectBound {
- left: left as i32,
- top: top as i32,
- right: right as i32,
- bottom: bottom as i32,
- }
- };
-
- let convert_x = |x: f64| x / self.width * w;
-
- let convert_y = |y: f64| y / self.height * h;
-
- ScanInfoStarRail {
- title_position: convert_rect(&self.title_pos),
- main_stat_name_position: convert_rect(&self.main_stat_name_pos),
- main_stat_value_position: convert_rect(&self.main_stat_value_pos),
- level_position: convert_rect(&self.level_pos),
- panel_position: convert_rect(&self.panel_pos),
- sub_stat1_name_pos: convert_rect(&self.sub_stat1_name_pos),
- sub_stat1_value_pos: convert_rect(&self.sub_stat1_value_pos),
- sub_stat2_name_pos: convert_rect(&self.sub_stat2_name_pos),
- sub_stat2_value_pos: convert_rect(&self.sub_stat2_value_pos),
- sub_stat3_name_pos: convert_rect(&self.sub_stat3_name_pos),
- sub_stat3_value_pos: convert_rect(&self.sub_stat3_value_pos),
- sub_stat4_name_pos: convert_rect(&self.sub_stat4_name_pos),
- sub_stat4_value_pos: convert_rect(&self.sub_stat4_value_pos),
- equip_position: convert_rect(&self.equip_pos),
- art_count_position: convert_rect(&self.art_count_pos),
- art_width: convert_x(self.art_width) as u32,
- art_height: convert_y(self.art_height) as u32,
- art_gap_x: convert_x(self.art_gap_x) as u32,
- art_gap_y: convert_y(self.art_gap_y) as u32,
- art_row: self.art_row as u32,
- art_col: self.art_col as u32,
- left_margin: convert_x(self.left_margin) as u32,
- top_margin: convert_y(self.top_margin) as u32,
- width: w as u32,
- height: h as u32,
- left,
- top,
- flag_x: convert_x(self.flag_x) as u32,
- flag_y: convert_y(self.flag_y) as u32,
- star_x: convert_x(self.star_x) as u32,
- star_y: convert_y(self.star_y) as u32,
- pool_position: convert_rect(&self.pool_pos),
- }
- }
-}
-
-pub const WINDOW_43_18: WindowInfoStarRail = WindowInfoStarRail {
- width: 3440.0,
- height: 1440.0,
-
- title_pos: Rect(170.0, 3140.0, 220.0, 2560.0),
- main_stat_name_pos: Rect(360.0, 2850.0, 400.0, 2560.0),
- main_stat_value_pos: Rect(400.0, 2850.0, 460.0, 2560.0),
- level_pos: Rect(575.0, 2640.0, 605.0, 2568.0),
- panel_pos: Rect(160.0, 3185.0, 1280.0, 2528.0),
-
- // 凑数用的
- sub_stat1_name_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat2_name_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat3_name_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat4_name_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
-
- equip_pos: Rect(1220.0, 5630.0, 1260.0, 3140.0),
- art_count_pos: Rect(50.0, 3185.0, 85.0, 2750.0),
-
- art_width: 2421.0 - 2257.0,
- art_height: 598.0 - 394.0,
- art_gap_x: 2257.0 - 2225.0,
- art_gap_y: 394.0 - 363.0,
-
- art_row: 5,
- art_col: 11,
-
- left_margin: 305.0,
- top_margin: 161.0,
-
- flag_x: 580.0,
- flag_y: 145.0,
-
- star_x: 3130.0,
- star_y: 200.0,
-
- pool_pos: Rect(170.0, 2610.0 + 30.0, 900.0, 2610.0),
-};
-
-pub const WINDOW_7_3: WindowInfoStarRail = WindowInfoStarRail {
- width: 2100.0,
- height: 900.0,
-
- title_pos: Rect(106.6, 1800.0, 139.6, 1550.0),
- main_stat_name_pos: Rect(224.3, 1690.0, 248.0, 1550.0),
- main_stat_value_pos: Rect(248.4, 1690.0, 286.8, 1550.0),
- level_pos: Rect(360.0, 1600.0, 378.0, 1557.0),
- panel_pos: Rect(100.0, 1941.0, 800.0, 1531.0),
-
- // 凑数用的
- sub_stat1_name_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat2_name_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat3_name_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat4_name_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
-
- equip_pos: Rect(762.6, 1850.0, 787.8, 1598.0),
- art_count_pos: Rect(27.1, 1945.0, 52.9, 1785.0),
-
- art_width: 1055.0 - 953.0,
- art_height: 373.0 - 247.0,
- art_gap_x: 953.0 - 933.0,
- art_gap_y: 247.0 - 227.0,
-
- art_row: 5,
- art_col: 11,
-
- left_margin: 166.0,
- top_margin: 101.0,
-
- flag_x: 340.0,
- flag_y: 89.8,
-
- star_x: 1900.0,
- star_y: 123.9,
- pool_pos: Rect(118.2, 1584.0 + 15.0, 510.3, 1584.0),
-};
-
-pub const WINDOW_16_9: WindowInfoStarRail = WindowInfoStarRail {
- width: 1600.0,
- height: 900.0,
-
- title_pos: Rect(111.0, 1400.0, 132.0, 1169.0),
- main_stat_name_pos: Rect(335.0, 1379.0, 355.0, 1207.0),
- main_stat_value_pos: Rect(335.0, 1535.0, 355.0, 1465.0),
- level_pos: Rect(258.0, 1240.0, 285.0, 1170.0),
- panel_pos: Rect(100.0, 1550.0, 800.0, 1150.0),
-
- sub_stat1_name_pos: Rect(370.0, 1369.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1369.0),
- sub_stat2_name_pos: Rect(402.0, 1369.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1369.0),
- sub_stat3_name_pos: Rect(435.0, 1369.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1369.0),
- sub_stat4_name_pos: Rect(467.0, 1369.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1369.0),
-
- equip_pos: Rect(762.6, 1389.4, 787.8, 1154.9),
- art_count_pos: Rect(813.0, 960.0, 836.0, 753.0),
-
- art_width: 197.5 - 112.5,
- art_height: 379.2 - 295.8,
- art_gap_x: 217.5 - 197.5,
- art_gap_y: 420.0 - 379.2,
-
- art_row: 5,
- art_col: 9,
-
- left_margin: 113.0,
- top_margin: 172.0,
-
- flag_x: 271.1,
- flag_y: 158.0,
-
- star_x: 1500.0,
- star_y: 208.0,
-
- pool_pos: Rect(118.2, 1218.7 + 15.0, 510.3, 1218.7),
-};
-
-
-pub const WINDOW_8_5: WindowInfoStarRail = WindowInfoStarRail {
- width: 1440.0,
- height: 900.0,
- title_pos: Rect(96.0, 1268.9, 126.1, 1000.9),
- main_stat_name_pos: Rect(201.6, 1128.1, 223.9, 1000.3),
- main_stat_value_pos: Rect(225.5, 1128.1, 262.8, 1000.3),
- level_pos: Rect(324.0, 1043.0, 340.0, 1006.0),
- panel_pos: Rect(90.0, 1350.0, 810.0, 981.0),
- // 凑数用的
- sub_stat1_name_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat2_name_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat3_name_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat4_name_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- equip_pos: Rect(776.0, 1247.3, 800.6, 1041.3),
- art_count_pos: Rect(25.0, 1353.1, 46.8, 1182.8),
- art_width: 950.0 - 857.0,
- art_height: 204.0 - 91.0,
- art_gap_x: 857.0 - 840.0,
- art_gap_y: 222.0 - 204.0,
- art_row: 6,
- art_col: 8,
- left_margin: 89.0,
- top_margin: 91.0,
- flag_x: 245.9,
- flag_y: 82.1,
- star_x: 1321.3,
- star_y: 111.3,
- pool_pos: Rect(103.6, 1025.8 + 15.0, 460.7, 1028.5),
-};
-
-
-pub const WINDOW_4_3: WindowInfoStarRail = WindowInfoStarRail {
- width: 1280.0,
- height: 960.0,
- title_pos: Rect(85.0, 1094.8, 111.7, 889.5),
- main_stat_name_pos: Rect(181.0, 998.0, 199.8, 889.5),
- main_stat_value_pos: Rect(199.8, 998.0, 233.4, 889.5),
- level_pos: Rect(288.0, 927.0, 302.0, 894.0),
- panel_pos: Rect(80.0, 1200.0, 880.0, 872.0),
- // 凑数用的
- sub_stat1_name_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat2_name_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat3_name_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat4_name_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- equip_pos: Rect(849.8, 1090.8, 870.1, 924.4),
- art_count_pos: Rect(22.9, 1202.3, 41.4, 1058.6),
- art_width: 844.0 - 762.0,
- art_height: 182.0 - 81.0,
- art_gap_x: 762.0 - 747.0,
- art_gap_y: 197.0 - 182.0,
- art_row: 7,
- art_col: 8,
- left_margin: 79.0,
- top_margin: 81.0,
- flag_x: 218.1,
- flag_y: 72.1,
- star_x: 1175.4,
- star_y: 95.8,
- pool_pos: Rect(93.2, 912.7 + 15.0, 412.4, 912.7),
-};
-
-
-pub const WINDOW_MAC_8_5: WindowInfoStarRail = WindowInfoStarRail {
- width: 1164.0,
- height: 755.0 - 28.,
- title_pos: Rect(122.0 - 28., 1090.0, 157.0 - 28., 770.0),
- main_stat_name_pos: Rect(230. - 28., 925., 254. - 28., 765.),
- main_stat_value_pos: Rect(253. - 28., 911., 294. - 28., 767.),
- level_pos: Rect(353. - 28., 813., 372. - 28., 781.),
- panel_pos: Rect(117. - 28., 1127., 666. - 28., 756.),
- // 凑数用的
- sub_stat1_name_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat1_value_pos: Rect(370.0, 1534.0, 390.0, 1204.0),
- sub_stat2_name_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat2_value_pos: Rect(402.0, 1534.0, 423.0, 1204.0),
- sub_stat3_name_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat3_value_pos: Rect(435.0, 1534.0, 456.0, 1204.0),
- sub_stat4_name_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- sub_stat4_value_pos: Rect(467.0, 1534.0, 487.0, 1204.0),
- equip_pos: Rect(627. - 28., 1090., 659. - 28., 815.),
- art_count_pos: Rect(51. - 28., 1076., 80. - 28., 924.),
- art_width: 250. - 155.,
- art_height: 234. - 118.,
- art_gap_x: 266. - 250.,
- art_gap_y: 250. - 234.,
- art_row: 4,
- art_col: 5,
- left_margin: 155.,
- top_margin: 118. - 28.,
- flag_x: 170., //检测颜色出现重复,则判定换行完成
- flag_y: 223. - 28.,
- star_x: 1060.,
- star_y: 140. - 28.,
- pool_pos: Rect(390. - 28., 1010., 504. - 28., 792.), //检测平均颜色是否相同,判断圣遗物有没有切换
-};
diff --git a/src/lib.rs b/src/lib.rs
deleted file mode 100644
index 2714f4f7..00000000
--- a/src/lib.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-pub mod artifact;
-pub mod capture;
-pub mod common;
-pub mod dto;
-pub mod expo;
-pub mod inference;
-pub mod info;
-pub mod scanner;
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index 4e3dae18..00000000
--- a/src/main.rs
+++ /dev/null
@@ -1,311 +0,0 @@
-use std::io::stdin;
-use std::path::Path;
-use std::time::SystemTime;
-
-#[cfg(target_os = "macos")]
-use yas_scanner::common::utils::get_pid_and_ui;
-use yas_scanner::common::{utils, UI};
-use yas_scanner::common::{PixelRect, RawImage};
-use yas_scanner::expo::good::GOODFormat;
-use yas_scanner::expo::mingyu_lab::MingyuLabFormat;
-use yas_scanner::expo::mona_uranai::MonaFormat;
-
-use yas_scanner::inference::pre_process::image_to_raw;
-use yas_scanner::info::info;
-use yas_scanner::scanner::yas_scanner::{YasScanner, YasScannerConfig};
-
-use clap::{App, Arg};
-use env_logger::Builder;
-use image::imageops::grayscale;
-
-use log::{info, warn, LevelFilter};
-
-fn open_local(path: String) -> RawImage {
- let img = image::open(path).unwrap();
- let img = grayscale(&img);
- let raw_img = image_to_raw(img);
-
- raw_img
-}
-
-fn main() {
- Builder::new().filter_level(LevelFilter::Info).init();
-
- #[cfg(windows)]
- if !utils::is_admin() {
- utils::error_and_quit("请以管理员身份运行该程序")
- }
-
- if let Some(v) = utils::check_update() {
- warn!("检测到新版本,请手动更新:{}", v);
- }
-
- let matches = App::new("YAS - 原神圣遗物导出器")
- .version(utils::VERSION)
- .author("wormtql <584130248@qq.com>")
- .about("Genshin Impact Artifact Exporter")
- .arg(
- Arg::with_name("max-row")
- .long("max-row")
- .takes_value(true)
- .help("最大扫描行数"),
- )
- .arg(
- Arg::with_name("dump")
- .long("dump")
- .required(false)
- .takes_value(false)
- .help("输出模型预测结果、二值化图像和灰度图像,debug专用"),
- )
- .arg(
- Arg::with_name("capture-only")
- .long("capture-only")
- .required(false)
- .takes_value(false)
- .help("只保存截图,不进行扫描,debug专用"),
- )
- .arg(
- Arg::with_name("min-star")
- .long("min-star")
- .takes_value(true)
- .help("最小星级"),
- )
- .arg(
- Arg::with_name("min-level")
- .long("min-level")
- .takes_value(true)
- .help("最小等级"),
- )
- .arg(
- Arg::with_name("max-wait-switch-artifact")
- .long("max-wait-switch-artifact")
- .takes_value(true)
- .help("切换圣遗物最大等待时间(ms)"),
- )
- .arg(
- Arg::with_name("output-dir")
- .long("output-dir")
- .short("o")
- .takes_value(true)
- .help("输出目录")
- .default_value("."),
- )
- .arg(
- Arg::with_name("scroll-stop")
- .long("scroll-stop")
- .takes_value(true)
- .help("翻页时滚轮停顿时间(ms)(翻页不正确可以考虑加大该选项,默认为80)"),
- )
- .arg(
- Arg::with_name("number")
- .long("number")
- .takes_value(true)
- .help("指定圣遗物数量(在自动识别数量不准确时使用)"),
- )
- .arg(
- Arg::with_name("verbose")
- .long("verbose")
- .help("显示详细信息"),
- )
- .arg(
- Arg::with_name("offset-x")
- .long("offset-x")
- .takes_value(true)
- .help("人为指定横坐标偏移(截图有偏移时可用该选项校正)"),
- )
- .arg(
- Arg::with_name("offset-y")
- .long("offset-y")
- .takes_value(true)
- .help("人为指定纵坐标偏移(截图有偏移时可用该选项校正)"),
- )
- .arg(
- Arg::with_name("output-format")
- .long("output-format")
- .short("f")
- .takes_value(true)
- .help("输出格式")
- .possible_values(&["mona", "mingyulab", "good"])
- .default_value("mona"),
- )
- .arg(
- Arg::with_name("cloud-wait-switch-artifact")
- .long("cloud-wait-switch-artifact")
- .takes_value(true)
- .help("指定云·原神切换圣遗物等待时间(ms)"),
- )
- .get_matches();
- let config = YasScannerConfig::from_match(&matches);
-
- let rect: PixelRect;
- let is_cloud: bool;
- let ui: UI;
-
- #[cfg(windows)]
- {
- use winapi::um::winuser::{SetForegroundWindow, ShowWindow, SW_RESTORE};
- // use winapi::um::shellscalingapi::{SetProcessDpiAwareness, PROCESS_PER_MONITOR_DPI_AWARE};
-
- utils::set_dpi_awareness();
-
- let hwnd;
-
- (hwnd, is_cloud) = utils::find_window_local("原神")
- .or_else(|_| utils::find_window_local("Genshin Impact"))
- .map(|hwnd| (hwnd, false))
- .unwrap_or_else(|_| {
- let Ok(hwnd) = utils::find_window_cloud() else {
- utils::error_and_quit("未找到原神窗口,请确认原神已经开启")
- };
- (hwnd, true)
- });
-
- unsafe {
- ShowWindow(hwnd, SW_RESTORE);
- }
- // utils::sleep(1000);
- unsafe {
- SetForegroundWindow(hwnd);
- }
- utils::sleep(1000);
-
- rect = utils::get_client_rect(hwnd).unwrap();
- ui = UI::Desktop;
- }
-
- #[cfg(all(target_os = "linux"))]
- {
- let window_id = unsafe {
- String::from_utf8_unchecked(
- std::process::Command::new("sh")
- .arg("-c")
- .arg(r#" xwininfo|grep "Window id"|cut -d " " -f 4 "#)
- .output()
- .unwrap()
- .stdout,
- )
- };
- let window_id = window_id.trim_end_matches("\n");
-
- let position_size = unsafe {
- String::from_utf8_unchecked(
- std::process::Command::new("sh")
- .arg("-c")
- .arg(&format!(r#" xwininfo -id {window_id}|cut -f 2 -d :|tr -cd "0-9\n"|grep -v "^$"|sed -n "1,2p;5,6p" "#))
- .output()
- .unwrap()
- .stdout,
- )
- };
-
- let mut info = position_size.split("\n");
-
- let left = info.next().unwrap().parse().unwrap();
- let top = info.next().unwrap().parse().unwrap();
- let width = info.next().unwrap().parse().unwrap();
- let height = info.next().unwrap().parse().unwrap();
-
- rect = PixelRect {
- left,
- top,
- width,
- height,
- };
- is_cloud = false; // todo: detect cloud genshin by title
- ui = UI::Desktop;
- }
-
- #[cfg(target_os = "macos")]
- {
- let (pid, ui_) = get_pid_and_ui();
- let window_title: String;
- (rect, window_title) = unsafe { utils::find_window_by_pid(pid).unwrap() };
- info!("Found genshin pid:{}, window name:{}", pid, window_title);
- is_cloud = false; // todo: detect cloud genshin by title
- ui = ui_;
- }
-
- // rect.scale(1.25);
- info!(
- "left = {}, top = {}, width = {}, height = {}",
- rect.left, rect.top, rect.width, rect.height
- );
-
- let mut info: info::ScanInfo;
-
- // desktop ui or mobile ui
- match ui {
- UI::Desktop => {
- info!("desktop ui");
- info = info::ScanInfo::from_pc(
- rect.width as u32,
- rect.height as u32,
- rect.left,
- rect.top,
- );
- },
- UI::Mobile => {
- info!("mobile ui");
- info = info::ScanInfo::from_mobile(
- rect.width as u32,
- rect.height as u32,
- rect.left,
- rect.top,
- );
- },
- }
-
- let offset_x = matches
- .value_of("offset-x")
- .unwrap_or("0")
- .parse::()
- .unwrap();
- let offset_y = matches
- .value_of("offset-y")
- .unwrap_or("0")
- .parse::()
- .unwrap();
- info.left += offset_x;
- info.top += offset_y;
-
- let mut scanner = YasScanner::new(info.clone(), config, is_cloud);
-
- let now = SystemTime::now();
- #[cfg(target_os = "macos")]
- {
- info!("初始化完成,请切换到原神窗口,yas将在10s后开始扫描圣遗物");
- utils::sleep(10000);
- }
- let results = scanner.start();
- let t = now.elapsed().unwrap().as_secs_f64();
- info!("time: {}s", t);
-
- let output_dir = Path::new(matches.value_of("output-dir").unwrap());
- match matches.value_of("output-format") {
- Some("mona") => {
- let output_filename = output_dir.join("mona.json");
- let mona = MonaFormat::new(&results);
- mona.save(String::from(output_filename.to_str().unwrap()));
- },
- Some("mingyulab") => {
- let output_filename = output_dir.join("mingyulab.json");
- let mingyulab = MingyuLabFormat::new(&results);
- mingyulab.save(String::from(output_filename.to_str().unwrap()));
- },
- Some("good") => {
- let output_filename = output_dir.join("good.json");
- let good = GOODFormat::new(&results);
- good.save(String::from(output_filename.to_str().unwrap()));
- },
- _ => unreachable!(),
- }
- // let info = info;
- // let img = info.art_count_position.capture_relative(&info).unwrap();
-
- // let mut inference = CRNNModel::new(String::from("model_training.onnx"), String::from("index_2_word.json"));
- // let s = inference.inference_string(&img);
- // println!("{}", s);
- info!("识别结束,请按Enter退出");
- let mut s = String::new();
- stdin().read_line(&mut s).unwrap();
-}
diff --git a/src/main_starrail.rs b/src/main_starrail.rs
deleted file mode 100644
index 47b54b28..00000000
--- a/src/main_starrail.rs
+++ /dev/null
@@ -1,299 +0,0 @@
-use std::io::stdin;
-use std::path::Path;
-use std::time::SystemTime;
-
-#[cfg(target_os = "macos")]
-use yas_scanner::common::utils::get_pid_and_ui;
-use yas_scanner::common::{utils, UI};
-use yas_scanner::common::{PixelRect, RawImage};
-use yas_scanner::expo::march7th::March7thFormat;
-
-use yas_scanner::inference::pre_process::image_to_raw;
-use yas_scanner::info::info_starrail;
-use yas_scanner::scanner::yas_scanner_starrail::{YasScanner, YasScannerConfig};
-
-use clap::{App, Arg};
-use env_logger::Builder;
-use image::imageops::grayscale;
-
-use log::{info, warn, LevelFilter};
-
-fn open_local(path: String) -> RawImage {
- let img = image::open(path).unwrap();
- let img = grayscale(&img);
- let raw_img = image_to_raw(img);
-
- raw_img
-}
-
-fn main() {
- Builder::new().filter_level(LevelFilter::Info).init();
-
- #[cfg(windows)]
- if !utils::is_admin() {
- utils::error_and_quit("请以管理员身份运行该程序")
- }
-
- if let Some(v) = utils::check_update() {
- warn!("检测到新版本,请手动更新:{}", v);
- }
-
- let matches = App::new("YAS - 崩坏:星穹铁道遗器导出器")
- .version(utils::VERSION)
- .author("wormtql <584130248@qq.com>")
- .about("Honkai: Star Rail Relic Exporter")
- .arg(
- Arg::with_name("max-row")
- .long("max-row")
- .takes_value(true)
- .help("最大扫描行数"),
- )
- .arg(
- Arg::with_name("dump")
- .long("dump")
- .required(false)
- .takes_value(false)
- .help("输出模型预测结果、二值化图像和灰度图像,debug专用"),
- )
- .arg(
- Arg::with_name("capture-only")
- .long("capture-only")
- .required(false)
- .takes_value(false)
- .help("只保存截图,不进行扫描,debug专用"),
- )
- .arg(
- Arg::with_name("min-star")
- .long("min-star")
- .takes_value(true)
- .help("最小星级"),
- )
- .arg(
- Arg::with_name("min-level")
- .long("min-level")
- .takes_value(true)
- .help("最小等级"),
- )
- .arg(
- Arg::with_name("max-wait-switch-relic")
- .long("max-wait-switch-relic")
- .takes_value(true)
- .help("切换遗器最大等待时间(ms)"),
- )
- .arg(
- Arg::with_name("output-dir")
- .long("output-dir")
- .short("o")
- .takes_value(true)
- .help("输出目录")
- .default_value("."),
- )
- .arg(
- Arg::with_name("scroll-stop")
- .long("scroll-stop")
- .takes_value(true)
- .help("翻页时滚轮停顿时间(ms)(翻页不正确可以考虑加大该选项,默认为80)"),
- )
- .arg(
- Arg::with_name("number")
- .long("number")
- .takes_value(true)
- .help("指定遗器数量(在自动识别数量不准确时使用)"),
- )
- .arg(
- Arg::with_name("verbose")
- .long("verbose")
- .help("显示详细信息"),
- )
- .arg(
- Arg::with_name("offset-x")
- .long("offset-x")
- .takes_value(true)
- .help("人为指定横坐标偏移(截图有偏移时可用该选项校正)"),
- )
- .arg(
- Arg::with_name("offset-y")
- .long("offset-y")
- .takes_value(true)
- .help("人为指定纵坐标偏移(截图有偏移时可用该选项校正)"),
- )
- .arg(
- Arg::with_name("output-format")
- .long("output-format")
- .short("f")
- .takes_value(true)
- .help("输出格式")
- .possible_values(&["march7th"])
- .default_value("march7th"),
- )
- .arg(
- Arg::with_name("cloud-wait-switch-relic")
- .long("cloud-wait-switch-relic")
- .takes_value(true)
- .help("指定云·崩坏:星穹铁道切换遗器等待时间(ms)"),
- )
- .get_matches();
- let config = YasScannerConfig::from_match(&matches);
-
- let rect: PixelRect;
- let is_cloud: bool;
- let ui: UI;
-
- #[cfg(windows)]
- {
- use winapi::um::winuser::{SetForegroundWindow, ShowWindow, SW_RESTORE};
- // use winapi::um::shellscalingapi::{SetProcessDpiAwareness, PROCESS_PER_MONITOR_DPI_AWARE};
-
- utils::set_dpi_awareness();
-
- let hwnd;
-
- (hwnd, is_cloud) = utils::find_window_local("崩坏:星穹铁道")
- .or_else(|_| utils::find_window_local("Honkai: Star Rail"))
- .map(|hwnd| (hwnd, false))
- .unwrap_or_else(|_| {
- let Ok(hwnd) = utils::find_window_cloud() else {
- utils::error_and_quit("未找到崩坏:星穹铁道窗口,请确认崩坏:星穹铁道已经开启")
- };
- (hwnd, true)
- });
-
- unsafe {
- ShowWindow(hwnd, SW_RESTORE);
- }
- // utils::sleep(1000);
- unsafe {
- SetForegroundWindow(hwnd);
- }
- utils::sleep(1000);
-
- rect = utils::get_client_rect(hwnd).unwrap();
- ui = UI::Desktop;
- }
-
- #[cfg(all(target_os = "linux"))]
- {
- let window_id = unsafe {
- String::from_utf8_unchecked(
- std::process::Command::new("sh")
- .arg("-c")
- .arg(r#" xwininfo|grep "Window id"|cut -d " " -f 4 "#)
- .output()
- .unwrap()
- .stdout,
- )
- };
- let window_id = window_id.trim_end_matches("\n");
-
- let position_size = unsafe {
- String::from_utf8_unchecked(
- std::process::Command::new("sh")
- .arg("-c")
- .arg(&format!(r#" xwininfo -id {window_id}|cut -f 2 -d :|tr -cd "0-9\n"|grep -v "^$"|sed -n "1,2p;5,6p" "#))
- .output()
- .unwrap()
- .stdout,
- )
- };
-
- let mut info = position_size.split("\n");
-
- let left = info.next().unwrap().parse().unwrap();
- let top = info.next().unwrap().parse().unwrap();
- let width = info.next().unwrap().parse().unwrap();
- let height = info.next().unwrap().parse().unwrap();
-
- rect = PixelRect {
- left,
- top,
- width,
- height,
- };
- is_cloud = false; // todo: detect cloud starrail by title
- ui = UI::Desktop;
- }
-
- #[cfg(target_os = "macos")]
- {
- let (pid, ui_) = get_pid_and_ui();
- let window_title: String;
- (rect, window_title) = unsafe { utils::find_window_by_pid(pid).unwrap() };
- info!("Found starrail pid:{}, window name:{}", pid, window_title);
- is_cloud = false; // todo: detect cloud starrail by title
- ui = ui_;
- }
-
- // rect.scale(1.25);
- info!(
- "left = {}, top = {}, width = {}, height = {}",
- rect.left, rect.top, rect.width, rect.height
- );
-
- let mut info: info_starrail::ScanInfoStarRail;
-
- // desktop ui or mobile ui
- match ui {
- UI::Desktop => {
- info!("desktop ui");
- info = info_starrail::ScanInfoStarRail::from_pc(
- rect.width as u32,
- rect.height as u32,
- rect.left,
- rect.top,
- );
- },
- UI::Mobile => {
- info!("mobile ui");
- info = info_starrail::ScanInfoStarRail::from_mobile(
- rect.width as u32,
- rect.height as u32,
- rect.left,
- rect.top,
- );
- },
- }
-
- let offset_x = matches
- .value_of("offset-x")
- .unwrap_or("0")
- .parse::()
- .unwrap();
- let offset_y = matches
- .value_of("offset-y")
- .unwrap_or("0")
- .parse::()
- .unwrap();
- info.left += offset_x;
- info.top += offset_y;
-
- let mut scanner = YasScanner::new(info.clone(), config, is_cloud);
-
- let now = SystemTime::now();
- #[cfg(target_os = "macos")]
- {
- info!("初始化完成,请切换到崩坏:星穹铁道窗口,yas将在10s后开始扫描遗器");
- utils::sleep(10000);
- }
- let results = scanner.start();
- let t = now.elapsed().unwrap().as_secs_f64();
- info!("time: {}s", t);
-
- let output_dir = Path::new(matches.value_of("output-dir").unwrap());
- match matches.value_of("output-format") {
- Some("march7th") => {
- let output_filename = output_dir.join("march7th.json");
- let march7th = March7thFormat::new(&results);
- march7th.save(String::from(output_filename.to_str().unwrap()));
- },
- _ => unreachable!(),
- }
- // let info = info;
- // let img = info.relic_count_position.capture_relative(&info).unwrap();
-
- // let mut inference = CRNNModel::new(String::from("model_training.onnx"), String::from("index_2_word.json"));
- // let s = inference.inference_string(&img);
- // println!("{}", s);
- info!("识别结束,请按Enter退出");
- let mut s = String::new();
- stdin().read_line(&mut s).unwrap();
-}
diff --git a/src/scanner/mod.rs b/src/scanner/mod.rs
deleted file mode 100644
index 903c3b8f..00000000
--- a/src/scanner/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub mod yas_scanner;
-pub mod yas_scanner_starrail;
diff --git a/src/scanner/yas_scanner.rs b/src/scanner/yas_scanner.rs
deleted file mode 100644
index 5b79e05e..00000000
--- a/src/scanner/yas_scanner.rs
+++ /dev/null
@@ -1,937 +0,0 @@
-use std::collections::HashSet;
-use std::convert::From;
-use std::fs;
-
-use std::sync::mpsc;
-use std::thread;
-use std::time::SystemTime;
-
-use clap::ArgMatches;
-use enigo::*;
-use image::{GenericImageView, RgbImage};
-use log::{error, info, warn};
-use tract_onnx::prelude::tract_itertools::Itertools;
-
-use crate::artifact::internal_artifact::{
- ArtifactSetName, ArtifactSlot, ArtifactStat, InternalArtifact,
-};
-use crate::capture::{self};
-use crate::common::character_name::CHARACTER_NAMES;
-use crate::common::color::Color;
-#[cfg(target_os = "macos")]
-use crate::common::utils::get_pid_and_ui;
-use crate::common::{utils, PixelRect, PixelRectBound};
-use crate::inference::inference::CRNNModel;
-use crate::inference::pre_process::{pre_process, to_gray, ImageConvExt};
-use crate::info::info::ScanInfo;
-
-// Playcover only, wine should not need this.
-#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
-use crate::common::utils::mac_scroll;
-
-pub struct YasScannerConfig {
- max_row: u32,
- capture_only: bool,
- min_star: u32,
- min_level: u32,
- max_wait_switch_artifact: u32,
- scroll_stop: u32,
- number: u32,
- verbose: bool,
- dump_mode: bool,
- cloud_wait_switch_artifact: u32,
- // offset_x: i32,
- // offset_y: i32,
-}
-
-impl YasScannerConfig {
- pub fn from_match(matches: &ArgMatches) -> YasScannerConfig {
- YasScannerConfig {
- max_row: matches
- .value_of("max-row")
- .unwrap_or("1000")
- .parse::()
- .unwrap(),
- capture_only: matches.is_present("capture-only"),
- dump_mode: matches.is_present("dump"),
- min_star: matches
- .value_of("min-star")
- .unwrap_or("4")
- .parse::()
- .unwrap(),
- min_level: matches
- .value_of("min-level")
- .unwrap_or("0")
- .parse::()
- .unwrap(),
- max_wait_switch_artifact: matches
- .value_of("max-wait-switch-artifact")
- .unwrap_or("800")
- .parse::()
- .unwrap(),
- scroll_stop: matches
- .value_of("scroll-stop")
- .unwrap_or("80")
- .parse::()
- .unwrap(),
- number: matches
- .value_of("number")
- .unwrap_or("0")
- .parse::()
- .unwrap(),
- verbose: matches.is_present("verbose"),
- cloud_wait_switch_artifact: matches
- .value_of("cloud-wait-switch-artifact")
- .unwrap_or("300")
- .parse::()
- .unwrap(),
- // offset_x: matches.value_of("offset-x").unwrap_or("0").parse::().unwrap(),
- // offset_y: matches.value_of("offset-y").unwrap_or("0").parse::().unwrap(),
- }
- }
-}
-
-pub struct YasScanner {
- model: CRNNModel,
- enigo: Enigo,
-
- info: ScanInfo,
- config: YasScannerConfig,
-
- row: u32,
- col: u32,
-
- pool: f64,
-
- initial_color: Color,
-
- // for scrolls
- scrolled_rows: u32,
- avg_scroll_one_row: f64,
-
- avg_switch_time: f64,
- scanned_count: u32,
-
- is_cloud: bool,
-}
-
-enum ScrollResult {
- TLE,
- // time limit exceeded
- Interrupt,
- Success,
- Skip,
-}
-
-#[derive(Debug)]
-pub struct YasScanResult {
- name: String,
- main_stat_name: String,
- main_stat_value: String,
- sub_stat_1: String,
- sub_stat_2: String,
- sub_stat_3: String,
- sub_stat_4: String,
- level: String,
- equip: String,
- star: u32,
-}
-
-impl YasScanResult {
- pub fn to_internal_artifact(&self) -> Option {
- let set_name = ArtifactSetName::from_zh_cn(&self.name)?;
- let slot = ArtifactSlot::from_zh_cn(&self.name)?;
- let star = self.star;
- if !self.level.contains("+") {
- return None;
- }
- let level = self
- .level
- .chars()
- .skip(1)
- .collect::()
- .parse::()
- .ok()?;
- let main_stat = ArtifactStat::from_zh_cn_raw(
- (self.main_stat_name.clone() + "+" + self.main_stat_value.as_str()).as_str(),
- )?;
- let sub1 = ArtifactStat::from_zh_cn_raw(&self.sub_stat_1);
- let sub2 = ArtifactStat::from_zh_cn_raw(&self.sub_stat_2);
- let sub3 = ArtifactStat::from_zh_cn_raw(&self.sub_stat_3);
- let sub4 = ArtifactStat::from_zh_cn_raw(&self.sub_stat_4);
-
- let equip = if self.equip.contains("已装备") {
- //let equip_name = self.equip.clone();
- //equip_name.remove_matches("已装备");
- //let equip_name = &self.equip[..self.equip.len()-9];
- let chars = self.equip.chars().collect_vec();
- let chars2 = &chars[..chars.len() - 3];
- let equip_name = chars2.iter().collect::();
- if CHARACTER_NAMES.contains(equip_name.as_str()) {
- Some(equip_name)
- } else {
- None
- }
- } else {
- None
- };
-
- let art = InternalArtifact {
- set_name,
- slot,
- star,
- level,
- main_stat,
- sub_stat_1: sub1,
- sub_stat_2: sub2,
- sub_stat_3: sub3,
- sub_stat_4: sub4,
- equip,
- };
- Some(art)
- }
-}
-
-fn calc_pool(row: &Vec) -> f32 {
- let len = row.len() / 3;
- let mut pool: f32 = 0.0;
-
- for i in 0..len {
- pool += row[i * 3] as f32;
- }
- // pool /= len as f64;
- pool
-}
-
-impl YasScanner {
- pub fn new(info: ScanInfo, config: YasScannerConfig, is_cloud: bool) -> YasScanner {
- let row = info.art_row;
- let col = info.art_col;
-
- YasScanner {
- model: CRNNModel::new(
- String::from("model_training.onnx"),
- String::from("index_2_word.json"),
- ),
- enigo: Enigo::new(),
- info,
- config,
-
- row,
- col,
-
- pool: -1.0,
- initial_color: Color::new(),
- scrolled_rows: 0,
- avg_scroll_one_row: 0.0,
-
- avg_switch_time: 0.0,
- scanned_count: 0,
-
- is_cloud,
- }
- }
-}
-
-impl YasScanner {
- fn align_row(&mut self) -> bool {
- #[cfg(target_os = "macos")]
- let (_, ui) = get_pid_and_ui();
- let mut count = 0;
- while count < 10 {
- let color = self.get_flag_color();
- if color.is_same(&self.initial_color) {
- return true;
- }
-
- #[cfg(windows)]
- self.enigo.mouse_scroll_y(-1);
- #[cfg(any(target_os = "linux"))]
- self.enigo.mouse_scroll_y(1);
- #[cfg(target_os = "macos")]
- {
- match ui {
- crate::common::UI::Desktop => {
- // mac_scroll(&mut self.enigo, 1);
- self.enigo.mouse_scroll_y(-1);
- utils::sleep(20);
- },
- crate::common::UI::Mobile => {
- mac_scroll(&mut self.enigo, 1);
- },
- }
- }
-
- utils::sleep(self.config.scroll_stop);
- count += 1;
- }
-
- false
- }
-
- /*
- pub fn panel_down(&mut self) {
- let info = &self.info;
- let max_scroll = 20;
- let mut count = 0;
- self.enigo.mouse_move_to(
- info.left + info.star_x as i32,
- info.top + info.star_y as i32,
- );
- let level_color = Color::from(57, 67, 79);
- let mut color = capture::get_color(
- info.level_position.left as u32,
- info.level_position.bottom as u32,
- );
- while !level_color.is_same(&color) && count < max_scroll {
- #[cfg(windows)]
- self.enigo.mouse_scroll_y(5);
- #[cfg(target_os = "linux")]
- self.enigo.mouse_scroll_y(-1);
-
- utils::sleep(self.config.scroll_stop);
- color = capture::get_color(
- info.level_position.left as u32,
- info.level_position.bottom as u32,
- );
- count += 1;
- }
- }
- */
-
- fn capture_panel(&mut self) -> Result {
- let _now = SystemTime::now();
- let w = self.info.panel_position.right - self.info.panel_position.left;
- let h = self.info.panel_position.bottom - self.info.panel_position.top;
- let rect: PixelRect = PixelRect {
- left: self.info.left as i32 + self.info.panel_position.left,
- top: self.info.top as i32 + self.info.panel_position.top,
- width: w,
- height: h,
- };
- let u8_arr = capture::capture_absolute(&rect)?;
- // info!("capture time: {}ms", now.elapsed().unwrap().as_millis());
- Ok(u8_arr)
- }
-
- fn get_art_count(&mut self) -> Result {
- let count = self.config.number;
- if let 0 = count {
- let info = &self.info;
- let raw_after_pp = self
- .info
- .art_count_position
- .capture_relative(info.left, info.top, true)
- .unwrap();
- let s = self.model.inference_string(&raw_after_pp);
- info!("raw count string: {}", s);
- if s.starts_with("圣遗物") {
- let chars = s.chars().collect::>();
- let count_str = (&chars[4..chars.len() - 5]).iter().collect::();
- let count = match count_str.parse::() {
- Ok(v) => v,
- Err(_) => {
- return Err(String::from("无法识别圣遗物数量"));
- },
- };
- return Ok(count);
- }
- Err(String::from("无法识别圣遗物数量"))
- } else {
- return Ok(count);
- }
- }
-
- fn get_flag_color(&self) -> Color {
- let flag_x = self.info.flag_x as i32 + self.info.left;
- let flag_y = self.info.flag_y as i32 + self.info.top;
- let color = capture::get_color(flag_x as u32, flag_y as u32);
-
- color
- }
-
- fn get_star(&self) -> u32 {
- let color = capture::get_color(
- (self.info.star_x as i32 + self.info.left) as u32,
- (self.info.star_y as i32 + self.info.top) as u32,
- );
-
- let color_1 = Color::from(113, 119, 139);
- let color_2 = Color::from(42, 143, 114);
- let color_3 = Color::from(81, 127, 203);
- let color_4 = Color::from(161, 86, 224);
- let color_5 = Color::from(188, 105, 50);
-
- let min_dis: u32 = color_1.dis_2(&color);
- let mut star = 1_u32;
- if color_2.dis_2(&color) < min_dis {
- star = 2;
- }
- if color_3.dis_2(&color) < min_dis {
- star = 3;
- }
- if color_4.dis_2(&color) < min_dis {
- star = 4;
- }
- if color_5.dis_2(&color) < min_dis {
- star = 5;
- }
-
- star
- }
-
- pub fn move_to(&mut self, row: u32, col: u32) {
- let info = &self.info;
- let left = info.left
- + (info.left_margin + (info.art_width + info.art_gap_x) * col + info.art_width / 2)
- as i32;
- let top = info.top
- + (info.top_margin + (info.art_height + info.art_gap_y) * row + info.art_height / 4)
- as i32;
- self.enigo.mouse_move_to(left as i32, top as i32);
- #[cfg(target_os = "macos")]
- utils::sleep(20);
- }
-
- fn sample_initial_color(&mut self) {
- self.initial_color = self.get_flag_color();
- }
-
- fn scroll_one_row(&mut self) -> ScrollResult {
- #[cfg(target_os = "macos")]
- let (_, ui) = get_pid_and_ui();
- let mut state = 0;
- let mut count = 0;
- let max_scroll = 20;
- while count < max_scroll {
- if utils::is_rmb_down() {
- return ScrollResult::Interrupt;
- }
-
- #[cfg(windows)]
- self.enigo.mouse_scroll_y(-5);
- #[cfg(any(target_os = "linux"))]
- self.enigo.mouse_scroll_y(1);
- #[cfg(target_os = "macos")]
- {
- match ui {
- crate::common::UI::Desktop => {
- // mac_scroll(&mut self.enigo, 1);
- self.enigo.mouse_scroll_y(-1);
- utils::sleep(20);
- },
- crate::common::UI::Mobile => {
- mac_scroll(&mut self.enigo, 1);
- },
- }
- }
- utils::sleep(self.config.scroll_stop);
- count += 1;
- let color: Color = self.get_flag_color();
- if state == 0 && !color.is_same(&self.initial_color) {
- state = 1;
- } else if state == 1 && self.initial_color.is_same(&color) {
- self.avg_scroll_one_row = (self.avg_scroll_one_row * self.scrolled_rows as f64
- + count as f64)
- / (self.scrolled_rows as f64 + 1.0);
- info!("avg scroll/row: {}", self.avg_scroll_one_row);
- self.scrolled_rows += 1;
- return ScrollResult::Success;
- }
- }
-
- ScrollResult::TLE
- }
-
- fn scroll_rows(&mut self, count: u32) -> ScrollResult {
- #[cfg(target_os = "macos")]
- let (_, ui) = get_pid_and_ui();
- if self.scrolled_rows >= 5 {
- let scroll = ((self.avg_scroll_one_row * count as f64 - 3.0).round() as u32).max(0);
- for _ in 0..scroll {
- #[cfg(windows)]
- self.enigo.mouse_scroll_y(-1);
- #[cfg(target_os = "linux")]
- self.enigo.mouse_scroll_y(1);
- #[cfg(target_os = "macos")]
- {
- match ui {
- crate::common::UI::Desktop => {
- // mac_scroll(&mut self.enigo, 1);
- self.enigo.mouse_scroll_y(-1);
- utils::sleep(20);
- },
- crate::common::UI::Mobile => {
- mac_scroll(&mut self.enigo, 1);
- },
- }
- }
- }
- utils::sleep(400);
- self.align_row();
- return ScrollResult::Skip;
- }
-
- for _ in 0..count {
- match self.scroll_one_row() {
- ScrollResult::TLE => return ScrollResult::TLE,
- ScrollResult::Interrupt => return ScrollResult::Interrupt,
- _ => (),
- }
- }
-
- ScrollResult::Success
- }
-
- /*
- fn start_capture_only(&mut self) {
- fs::create_dir("captures");
- let info = &self.info.clone();
-
- println!("capture l:{}, t:{}, w:{},h:{}", info.left, info.top, info.width, info.height);
- let raw_im_rect = PixelRectBound {
- left: info.left as i32,
- top: info.top as i32,
- right: info.left + info.width as i32,
- bottom: info.top + info.height as i32,
- };
-
- let raw_im = raw_im_rect.capture_relative(info, false).unwrap();
- raw_im.grayscale_to_gray_image().save("captures/raw_im.png");
- println!("Finish capture raw");
- panic!();
-
- let count = self.info.art_count_position.capture_relative(info, false).unwrap();
- count.to_gray_image().save("captures/count.png");
-
- let convert_rect = |rect: &PixelRectBound| PixelRect {
- left: rect.left - info.panel_position.left,
- top: rect.top - info.panel_position.top,
- width: rect.right - rect.left,
- height: rect.bottom - rect.top,
- };
-
- let panel = self.capture_panel().unwrap();
- let im_title = pre_process(panel.crop_to_raw_img(&convert_rect(&info.title_position)));
- if let Some(im) = im_title {
- im.to_gray_image().save("captures/title.png").expect("Err");
- }
-
- let im_main_stat_name =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.main_stat_name_position)));
- if let Some(im) = im_main_stat_name {
- im.to_gray_image()
- .save("captures/main_stat_name.png")
- .expect("Err");
- }
-
- let im_main_stat_value =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.main_stat_value_position)));
- if let Some(im) = im_main_stat_value {
- im.to_gray_image()
- .save("captures/main_stat_value.png")
- .expect("Err");
- }
-
- let im_sub_stat_1 =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.sub_stat1_position)));
- if let Some(im) = im_sub_stat_1 {
- im.to_gray_image()
- .save("captures/sub_stat_1.png")
- .expect("Err");
- }
-
- let im_sub_stat_2 =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.sub_stat2_position)));
- if let Some(im) = im_sub_stat_2 {
- im.to_gray_image()
- .save("captures/sub_stat_2.png")
- .expect("Err");
- }
-
- let im_sub_stat_3 =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.sub_stat3_position)));
- if let Some(im) = im_sub_stat_3 {
- im.to_gray_image()
- .save("captures/sub_stat_3.png")
- .expect("Err");
- }
-
- let im_sub_stat_4 =
- pre_process(panel.crop_to_raw_img(&convert_rect(&info.sub_stat4_position)));
- if let Some(im) = im_sub_stat_4 {
- im.to_gray_image()
- .save("captures/sub_stat_4.png")
- .expect("Err");
- }
-
- let im_level = pre_process(panel.crop_to_raw_img(&convert_rect(&info.level_position)));
- if let Some(im) = im_level {
- im.to_gray_image().save("captures/level.png").expect("Err");
- }
-
- let im_equip = pre_process(panel.crop_to_raw_img(&convert_rect(&info.equip_position)));
- if let Some(im) = im_equip {
- im.to_gray_image().save("captures/equip.png").expect("Err");
- }
- }
- */
- pub fn start(&mut self) -> Vec {
- //self.panel_down();
- /* if self.config.capture_only {
- self.start_capture_only();
- return Vec::new();
- } */
-
- let count = match self.get_art_count() {
- Ok(v) => v,
- Err(_) => 1500,
- };
-
- let total_row = (count + self.col - 1) / self.col;
- let last_row_col = if count % self.col == 0 {
- self.col
- } else {
- count % self.col
- };
-
- // println!("检测到圣遗物数量:{},若无误请按回车,否则输入正确的圣遗物数量:", count);
- // let mut s: String = String::new();
- // stdin().read_line(&mut s);
- // if s.trim() != "" {
- // count = s.trim().parse::().unwrap();
- // }
-
- info!("detected count: {}", count);
- info!("total row: {}", total_row);
- info!("last column: {}", last_row_col);
-
- let (tx, rx) = mpsc::channel::