Compare commits
24 commits
Author | SHA1 | Date | |
---|---|---|---|
4c425dbddf | |||
339e8534ec | |||
fb30301da8 | |||
e1d0ac3200 | |||
9f0484f4a8 | |||
aa0f1f6999 | |||
acdeb3d19a | |||
b30209c62f | |||
5af608f45b | |||
6db590f333 | |||
56624427d5 | |||
8ef3238ac3 | |||
49853f9d2f | |||
e1beced72c | |||
995bc5e3ed | |||
3a794874dc | |||
ef7710cca6 | |||
f50e5e09e6 | |||
2fcb2ac3e7 | |||
ad179ac9e0 | |||
d683804623 | |||
ec11c16477 | |||
65007fdf50 | |||
a6594d4abc |
6 changed files with 397 additions and 206 deletions
448
Cargo.lock
generated
448
Cargo.lock
generated
|
@ -1,34 +1,68 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "adler32"
|
||||
version = "1.2.0"
|
||||
name = "adler"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "aes"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cipher",
|
||||
"cpufeatures",
|
||||
"opaque-debug",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.4.7"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
|
||||
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base64ct"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.4.2"
|
||||
version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"
|
||||
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "bzip2"
|
||||
version = "0.3.3"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b"
|
||||
checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0"
|
||||
dependencies = [
|
||||
"bzip2-sys",
|
||||
"libc",
|
||||
|
@ -36,9 +70,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bzip2-sys"
|
||||
version = "0.1.10+1.0.8"
|
||||
version = "0.1.11+1.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c"
|
||||
checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
|
@ -47,15 +81,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.66"
|
||||
version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
|
@ -64,12 +95,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.2.1"
|
||||
name = "cipher"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
|
||||
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
|
||||
|
||||
[[package]]
|
||||
name = "cpufeatures"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ccfd8c0ee4cce11e45b3fd6f9d5e69e0cc62912aa6a0cb1bf4617b0eba5a12f"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -86,45 +172,88 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
|||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.14"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42"
|
||||
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10",
|
||||
"crc32fast",
|
||||
"libc",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.9.1"
|
||||
name = "generic-array"
|
||||
version = "0.14.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
|
||||
checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashlink"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d99cf782f0dc4372d26846bec3de7804ceb5df083c2d4462c0b8d2330e894fa8"
|
||||
checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"
|
||||
dependencies = [
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.86"
|
||||
name = "hmac"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
|
||||
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
|
||||
dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.126"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
||||
|
||||
[[package]]
|
||||
name = "libsqlite3-sys"
|
||||
version = "0.20.1"
|
||||
version = "0.24.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "64d31059f22935e6c31830db5249ba2b7ecd54fd73a9909286f0a67aa55c2fbd"
|
||||
checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
|
@ -133,22 +262,54 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.3.4"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.3.7"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
|
||||
checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
|
||||
dependencies = [
|
||||
"adler32",
|
||||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_threads"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
|
||||
|
||||
[[package]]
|
||||
name = "opaque-debug"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
|
||||
|
||||
[[package]]
|
||||
name = "password-hash"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"rand_core",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pbdbfixer"
|
||||
version = "0.7.2"
|
||||
version = "0.8.3"
|
||||
dependencies = [
|
||||
"quick-xml",
|
||||
"rusqlite",
|
||||
|
@ -156,43 +317,43 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.19"
|
||||
name = "pbkdf2"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
|
||||
checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
"digest",
|
||||
"hmac",
|
||||
"password-hash",
|
||||
"sha2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.21.0"
|
||||
name = "pkg-config"
|
||||
version = "0.3.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0452695941410a58c8ce4391707ba9bad26a247173bd9886a05a5e8a8babec75"
|
||||
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.23.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9279fbdacaad3baf559d8cabe0acc3d06e30ea14931af31af79578ac0946decc"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.9"
|
||||
name = "rand_core"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
|
||||
[[package]]
|
||||
name = "rusqlite"
|
||||
version = "0.24.2"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5f38ee71cbab2c827ec0ac24e76f82eca723cee92c509a65f67dee393c25112"
|
||||
checksum = "85127183a999f7db96d1a976a309eebbfb6ea3b0b400ddd8340190129de6eb7a"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"fallible-iterator",
|
||||
|
@ -203,104 +364,127 @@ dependencies = [
|
|||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c77f4e7f65455545c2153c1253d25056825e77ee2533f0e41deb65a93a34852f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.6.1"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
|
||||
checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.60"
|
||||
name = "subtle"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.1.44"
|
||||
version = "0.3.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
|
||||
checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"libc",
|
||||
"wasi",
|
||||
"winapi",
|
||||
"num_threads",
|
||||
"time-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.1"
|
||||
name = "time-macros"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
|
||||
checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.11"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.10.0+wasi-snapshot-preview1"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "0.5.10"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a8977234acab718eb2820494b2f96cbb16004c19dddf88b7445b27381450997"
|
||||
checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"byteorder",
|
||||
"bzip2",
|
||||
"constant_time_eq",
|
||||
"crc32fast",
|
||||
"crossbeam-utils",
|
||||
"flate2",
|
||||
"thiserror",
|
||||
"hmac",
|
||||
"pbkdf2",
|
||||
"sha1",
|
||||
"time",
|
||||
"zstd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd"
|
||||
version = "0.10.2+zstd.1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f4a6bd64f22b5e3e94b4e238669ff9f10815c27a5180108b849d24174a83847"
|
||||
dependencies = [
|
||||
"zstd-safe",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-safe"
|
||||
version = "4.1.6+zstd.1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94b61c51bb270702d6167b8ce67340d2754b088d0c091b06e593aa772c3ee9bb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"zstd-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zstd-sys"
|
||||
version = "1.6.3+zstd.1.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
|
|
10
Cargo.toml
10
Cargo.toml
|
@ -1,15 +1,15 @@
|
|||
[package]
|
||||
name = "pbdbfixer"
|
||||
version = "0.7.2"
|
||||
version = "0.8.3"
|
||||
authors = ["Martin Brodbeck <martin@brodbeck-online.de>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
zip = "0.5"
|
||||
quick-xml = "0.21"
|
||||
zip = "0.6"
|
||||
quick-xml = "0.23"
|
||||
|
||||
[dependencies.rusqlite]
|
||||
version = "0.24"
|
||||
version = "0.27"
|
||||
features = ["bundled"]
|
||||
|
|
23
README.md
23
README.md
|
@ -15,15 +15,21 @@ The app tries to fix the following issues in the database
|
|||
- Add missing genre if present in epub (genre and booktogenre tables)
|
||||
- Add missing series information (books_impl table)
|
||||
|
||||
The best results are achieved when metadata has been carefully maintained with **Calibre**.
|
||||
|
||||
## Compatibility
|
||||
This program is tested on a PocketBook
|
||||
- *Touch HD 3* (software version 6.1.900)
|
||||
- *Inkpad 3 Pro* (software version 6.0.1067)
|
||||
- Known minor issue: dialog orientation is wrong
|
||||
- *Touch Lux 4* (software version 6.0.1118)
|
||||
- *Touch Lux 4* (software version 6.5)
|
||||
- *Touch HD 3* (software version 6.7)
|
||||
- *Era* (software version 6.8) [^1]
|
||||
- *InkPad 3 Pro* (software version 6.8) [^1]
|
||||
- *InkPad 4* (software version 6.8)
|
||||
- *Verse Pro* (software version 6.8) [^1]
|
||||
|
||||
It might work with other PocketBook devices/software versions. Please tell me if it works for you (and do make a backup of the explorer-3.db file before trying!).
|
||||
|
||||
<span style="color: red">**Please note:**</span> As I do not currently own a PocketBook device, I am unfortunately unable to react to changes in the database structure. Perhaps you can send me your `explorer-3.db` so that I can take a look at the changes. Just get in touch with me.
|
||||
|
||||
## Installation and Usage
|
||||
---
|
||||
**WARNING**:
|
||||
|
@ -35,10 +41,13 @@ Use at your own risk. In case of doubt it is not a mistake to make a backup of t
|
|||
Just copy the executable file into the PocketBook's application directory. If you encounter duplicate authors or other issues (see "Features" above) in the PocketBook's library, open the applications screen and tap on the PbDbFixer icon.
|
||||
|
||||
If you don't see any changes:
|
||||
There might be an explorer (which shows your library) process already running Then you should just stop/kill it with the task manager. Putting the device to sleep and then wake it up might also work. Afterwards, the changes should be visible to the explorer.
|
||||
There might be an explorer (which shows your library) process already running. Then you should just stop/kill it with the task manager. Putting the device to sleep and then wake it up might also work. Afterwards, the changes should be visible to the explorer.
|
||||
|
||||
## Feedback
|
||||
Feedback is highly appreciated. You can reach me via Matrix [@beedaddy:matrix.rustysoft.de](https://matrix.to/#/@beedaddy:matrix.rustysoft.de) or ask questions in the [PbDbFixer-Thread](https://www.e-reader-forum.de/t/pbdbfixer-noch-ein-tool-zum-korrigieren-von-metadaten.156702/) of the German *E-Reader Forum*.
|
||||
|
||||
## Build
|
||||
If you want to build PbDbFixer yourself, you have to have the cross compiler for ARM CPUs installed. On Arch Linux, the AUR package `arm-linux-gnueabi-gcc75-linaro-bin` does the job. Don't forget to tell `cargo` which compiler/linker it has to invoke. In my case, I had to edit `~/.cargo/config`:
|
||||
If you want to build PbDbFixer yourself, make sure that you have Rust's toolchain target `arm-unknown-linux-gnueabi` as well as the GCC cross compiler for ARM CPUs installed. On **Arch** Linux, the AUR package `arm-linux-gnueabi-gcc75-linaro-bin` does the job. On **Debian**, you have to install the package `gcc-arm-linux-gnueabi`. Don't forget to tell `cargo` which compiler/linker it has to invoke. In my case, I had to edit `~/.cargo/config`:
|
||||
```
|
||||
[target.arm-unknown-linux-gnueabi]
|
||||
linker = "arm-linux-gnueabi-gcc"
|
||||
|
@ -47,3 +56,5 @@ Now you can easily compile the stuff by invoking
|
|||
```
|
||||
cargo build --release --target=arm-unknown-linux-gnueabi
|
||||
```
|
||||
|
||||
[^1]: User feedback
|
|
@ -1,4 +1,4 @@
|
|||
use rusqlite::{named_params, Connection, Transaction, NO_PARAMS};
|
||||
use rusqlite::{named_params, Connection, Transaction};
|
||||
|
||||
use crate::epub;
|
||||
|
||||
|
@ -9,7 +9,6 @@ pub struct BookEntry {
|
|||
filepath: String,
|
||||
author: String,
|
||||
firstauthor: String,
|
||||
has_drm: bool,
|
||||
genre: String,
|
||||
first_author_letter: String,
|
||||
series: String,
|
||||
|
@ -18,8 +17,16 @@ pub struct BookEntry {
|
|||
fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
|
||||
let mut book_entries = Vec::new();
|
||||
|
||||
let mut stmt = tx
|
||||
.prepare(
|
||||
let version: i32 = tx
|
||||
.query_row(r#"SELECT id FROM version"#, [], |r| r.get(0))
|
||||
.unwrap();
|
||||
|
||||
let books_or_files = match version {
|
||||
x if x >= 38 => "files",
|
||||
_ => "books",
|
||||
};
|
||||
|
||||
let stmt_str = format!(
|
||||
r#"
|
||||
SELECT books.id, folders.name, files.filename, books.firstauthor,
|
||||
books.author, genres.name, first_author_letter, series
|
||||
|
@ -31,12 +38,14 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
|
|||
ON books.id = btg.bookid
|
||||
LEFT OUTER JOIN genres
|
||||
ON genres.id = btg.genreid
|
||||
WHERE files.storageid = 1 AND books.ext = 'epub'
|
||||
WHERE files.storageid = 1 AND {}.ext = 'epub'
|
||||
ORDER BY books.id"#,
|
||||
)
|
||||
.unwrap();
|
||||
&books_or_files
|
||||
);
|
||||
|
||||
let mut rows = stmt.query(NO_PARAMS).unwrap();
|
||||
let mut stmt = tx.prepare(&stmt_str).unwrap();
|
||||
|
||||
let mut rows = stmt.query([]).unwrap();
|
||||
|
||||
while let Some(row) = rows.next().unwrap() {
|
||||
let book_id: i32 = row.get(0).unwrap();
|
||||
|
@ -45,10 +54,6 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
|
|||
let filepath = format!("{}/{}", prefix, filename);
|
||||
let firstauthor: String = row.get(3).unwrap_or_default();
|
||||
let author: String = row.get(4).unwrap_or_default();
|
||||
let has_drm = match prefix.as_str() {
|
||||
"/mnt/ext1/Digital Editions" => true,
|
||||
_ => false,
|
||||
};
|
||||
let genre: String = row.get(5).unwrap_or_default();
|
||||
let first_author_letter = row.get(6).unwrap_or_default();
|
||||
let series: String = row.get(7).unwrap_or_default();
|
||||
|
@ -58,7 +63,6 @@ fn get_epubs_from_database(tx: &Transaction) -> Vec<BookEntry> {
|
|||
filepath,
|
||||
firstauthor,
|
||||
author,
|
||||
has_drm,
|
||||
genre,
|
||||
first_author_letter,
|
||||
series,
|
||||
|
@ -85,31 +89,44 @@ fn remove_ghost_books_from_db(tx: &Transaction) -> usize {
|
|||
)
|
||||
.unwrap();
|
||||
|
||||
let num = stmt.execute(NO_PARAMS).unwrap();
|
||||
let num = stmt.execute([]).unwrap();
|
||||
|
||||
tx.execute(
|
||||
r#"DELETE FROM books_settings WHERE bookid NOT IN ( SELECT id FROM books_impl )"#,
|
||||
NO_PARAMS,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let version: i32 = tx
|
||||
.query_row(r#"SELECT id FROM version"#, [], |r| r.get(0))
|
||||
.unwrap();
|
||||
if version >= 37 {
|
||||
tx.execute(
|
||||
r#"DELETE FROM books_fast_hashes WHERE book_id NOT IN ( SELECT id FROM books_impl )"#,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
} else {
|
||||
tx.execute(
|
||||
r#"DELETE FROM books_uids WHERE book_id NOT IN ( SELECT id FROM books_impl )"#,
|
||||
NO_PARAMS,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
tx.execute(
|
||||
r#"DELETE FROM bookshelfs_books WHERE bookid NOT IN ( SELECT id FROM books_impl )"#,
|
||||
NO_PARAMS,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
tx.execute(
|
||||
r#"DELETE FROM booktogenre WHERE bookid NOT IN ( SELECT id FROM books_impl )"#,
|
||||
NO_PARAMS,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
tx.execute(
|
||||
r#"DELETE FROM social WHERE bookid NOT IN ( SELECT id FROM books_impl )"#,
|
||||
NO_PARAMS,
|
||||
[],
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
@ -119,7 +136,6 @@ fn remove_ghost_books_from_db(tx: &Transaction) -> usize {
|
|||
pub struct Statistics {
|
||||
pub authors_fixed: i32,
|
||||
pub ghost_books_cleaned: usize,
|
||||
pub drm_skipped: usize,
|
||||
pub genres_fixed: usize,
|
||||
pub sorting_fixed: usize,
|
||||
pub series_fixed: usize,
|
||||
|
@ -139,7 +155,6 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let mut stat = Statistics {
|
||||
authors_fixed: 0,
|
||||
ghost_books_cleaned: 0,
|
||||
drm_skipped: 0,
|
||||
genres_fixed: 0,
|
||||
sorting_fixed: 0,
|
||||
series_fixed: 0,
|
||||
|
@ -152,11 +167,6 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let book_entries = get_epubs_from_database(&tx);
|
||||
|
||||
for entry in book_entries {
|
||||
if entry.has_drm {
|
||||
stat.drm_skipped = stat.drm_skipped + 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Some(epub_metadata) = epub::get_epub_metadata(&entry.filepath) {
|
||||
// Fix firstauthor…
|
||||
let mut firstauthors = epub_metadata
|
||||
|
@ -170,7 +180,7 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let mut stmt = tx
|
||||
.prepare("UPDATE books_impl SET firstauthor = :file_as WHERE id = :book_id")
|
||||
.unwrap();
|
||||
stmt.execute_named(
|
||||
stmt.execute(
|
||||
named_params![":file_as": firstauthors.join(" & "), ":book_id": entry.id],
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -185,11 +195,12 @@ pub fn fix_db_entries() -> Statistics {
|
|||
.unwrap_or_default()
|
||||
.to_string()
|
||||
.to_uppercase();
|
||||
if entry.first_author_letter != first_author_letter {
|
||||
|
||||
if first_author_letter != "\0" && (entry.first_author_letter != first_author_letter) {
|
||||
let mut stmt = tx
|
||||
.prepare("UPDATE books_impl SET first_author_letter = :first_letter WHERE id = :book_id")
|
||||
.unwrap();
|
||||
stmt.execute_named(
|
||||
stmt.execute(
|
||||
named_params![":first_letter": first_author_letter,":book_id": entry.id],
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -208,7 +219,7 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let mut stmt = tx
|
||||
.prepare("UPDATE books_impl SET author = :authors WHERE id = :book_id")
|
||||
.unwrap();
|
||||
stmt.execute_named(
|
||||
stmt.execute(
|
||||
named_params![":authors": authornames.join(", "), ":book_id": entry.id],
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -220,7 +231,7 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let mut stmt = tx
|
||||
.prepare(r#"INSERT INTO genres (name) SELECT :genre ON CONFLICT DO NOTHING"#)
|
||||
.unwrap();
|
||||
stmt.execute_named(named_params![":genre": &epub_metadata.genre])
|
||||
stmt.execute(named_params![":genre": &epub_metadata.genre])
|
||||
.unwrap();
|
||||
let mut stmt = tx
|
||||
.prepare(
|
||||
|
@ -232,9 +243,7 @@ pub fn fix_db_entries() -> Statistics {
|
|||
ON CONFLICT DO NOTHING"#,
|
||||
)
|
||||
.unwrap();
|
||||
stmt.execute_named(
|
||||
named_params![":bookid": &entry.id, ":genre": &epub_metadata.genre],
|
||||
)
|
||||
stmt.execute(named_params![":bookid": &entry.id, ":genre": &epub_metadata.genre])
|
||||
.unwrap();
|
||||
stat.genres_fixed = stat.genres_fixed + 1;
|
||||
}
|
||||
|
@ -244,7 +253,7 @@ pub fn fix_db_entries() -> Statistics {
|
|||
let mut stmt = tx
|
||||
.prepare("UPDATE books_impl SET series = :series, numinseries = :series_index WHERE id = :book_id")
|
||||
.unwrap();
|
||||
stmt.execute_named(
|
||||
stmt.execute(
|
||||
named_params![":series": &epub_metadata.series.name, ":series_index": &epub_metadata.series.index, ":book_id": entry.id],
|
||||
)
|
||||
.unwrap();
|
||||
|
|
|
@ -151,6 +151,10 @@ pub fn get_epub_metadata(filename: &str) -> Option<EpubMetadata> {
|
|||
.unwrap()
|
||||
.as_str();
|
||||
xml_authors.insert(curr_id.clone(), XmlAut::new());
|
||||
} else {
|
||||
curr_id = "none".to_string() + xml_authors.len().to_string().as_str();
|
||||
let entry = xml_authors.entry(curr_id.clone()).or_insert(XmlAut::new());
|
||||
entry.role = "aut".to_string();
|
||||
}
|
||||
} else {
|
||||
if let Some(file_as_val) = e
|
||||
|
|
17
src/main.rs
17
src/main.rs
|
@ -25,25 +25,12 @@ fn main() {
|
|||
|
||||
if cfg!(target_arch = "arm") {
|
||||
if stat.anything_fixed() == false {
|
||||
if stat.drm_skipped == 0 {
|
||||
pocketbook::dialog(
|
||||
pocketbook::Icon::Info,
|
||||
"The database seems to be ok.\n\
|
||||
Nothing had to be fixed.",
|
||||
&["OK"],
|
||||
);
|
||||
} else {
|
||||
pocketbook::dialog(
|
||||
pocketbook::Icon::Info,
|
||||
&format!(
|
||||
"The database seems to be ok.\n\
|
||||
Nothing had to be fixed.\n\
|
||||
(Books skipped (DRM): {})",
|
||||
&stat.drm_skipped
|
||||
),
|
||||
&["OK"],
|
||||
);
|
||||
}
|
||||
} else {
|
||||
pocketbook::dialog(
|
||||
pocketbook::Icon::Info,
|
||||
|
@ -52,13 +39,11 @@ fn main() {
|
|||
Sorting fixed: {}\n\
|
||||
Genres fixed: {}\n\
|
||||
Series fixed: {}\n\
|
||||
Books skipped (DRM): {}\n\
|
||||
Books cleaned from DB: {}",
|
||||
&stat.authors_fixed,
|
||||
&stat.sorting_fixed,
|
||||
&stat.genres_fixed,
|
||||
&stat.series_fixed,
|
||||
&stat.drm_skipped,
|
||||
&stat.ghost_books_cleaned
|
||||
),
|
||||
&["OK"],
|
||||
|
@ -70,13 +55,11 @@ fn main() {
|
|||
Sorting fixed: {}\n\
|
||||
Genres fixed: {}\n\
|
||||
Series fixed: {}\n\
|
||||
Books skipped (DRM): {}\n\
|
||||
Books cleaned from DB: {}",
|
||||
&stat.authors_fixed,
|
||||
&stat.sorting_fixed,
|
||||
&stat.genres_fixed,
|
||||
&stat.series_fixed,
|
||||
&stat.drm_skipped,
|
||||
&stat.ghost_books_cleaned
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue