From 21eefc0fb965a263931d71b7f83fdf19f66cdcf9 Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Thu, 20 Nov 2025 08:28:02 +0100 Subject: [PATCH 1/3] - clap updated --- Cargo.lock | 1113 ++++++++++++++++++++++------------ Cargo.toml | 14 +- src/anonymizer/README.md | 0 src/anonymizer/anonymizer.rs | 108 ++++ src/main.rs | 170 +++--- 5 files changed, 922 insertions(+), 483 deletions(-) create mode 100644 src/anonymizer/README.md create mode 100644 src/anonymizer/anonymizer.rs diff --git a/Cargo.lock b/Cargo.lock index 0a0813e..eecdab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -31,7 +22,18 @@ checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" dependencies = [ "aes-soft", "aesni", - "cipher", + "cipher 0.2.5", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher 0.4.4", + "cpufeatures", ] [[package]] @@ -40,7 +42,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" dependencies = [ - "cipher", + "cipher 0.2.5", "opaque-debug", ] @@ -50,7 +52,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" dependencies = [ - "cipher", + "cipher 0.2.5", "opaque-debug", ] @@ -61,7 +63,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -69,9 +71,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -92,10 +94,54 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.9.0" +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] [[package]] name = "argminmax" @@ -137,50 +183,18 @@ version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" - [[package]] name = "bitflags" version = "1.3.2" @@ -189,9 +203,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "block-buffer" @@ -202,14 +216,23 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block-modes" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" dependencies = [ - "block-padding", - "cipher", + "block-padding 0.2.1", + "cipher 0.2.5", ] [[package]] @@ -218,30 +241,45 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "bytemuck" -version = "1.23.2" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.10.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f154e572231cb6ba2bd1176980827e3d5dc04cc183a75dea38109fbdd672d29" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -252,9 +290,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "calamine" @@ -271,11 +309,20 @@ dependencies = [ "zip", ] +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "cc" -version = "1.2.36" +version = "1.2.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" +checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" dependencies = [ "find-msvc-tools", "jobserver", @@ -285,9 +332,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" @@ -299,7 +346,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -311,26 +358,61 @@ dependencies = [ "generic-array", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" -version = "2.27.1" +version = "4.5.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8c532887f1a292d17de05ae858a8fe50a301e196f9ef0ddb7ccd0d1d00f180" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ - "ansi_term", - "atty", - "bitflags 0.9.1", + "anstream", + "anstyle", + "clap_lex", "strsim", - "textwrap", - "unicode-width 0.1.14", - "vec_map", ] +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + [[package]] name = "cmake" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +checksum = "b042e5d8a74ae91bb0961acd039822472ec99f8ab0948cbf6d1369588f8be586" dependencies = [ "cc", ] @@ -344,6 +426,12 @@ dependencies = [ "encoding_rs", ] +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "colored" version = "2.2.0" @@ -362,7 +450,7 @@ checksum = "b03b7db8e0b4b2fdad6c551e634134e99ec000e5c8c3b6856c65e8bbaded7a3b" dependencies = [ "crossterm", "unicode-segmentation", - "unicode-width 0.2.1", + "unicode-width", ] [[package]] @@ -448,7 +536,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "crossterm_winapi", "document-features", "parking_lot", @@ -465,23 +553,33 @@ dependencies = [ "winapi", ] +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "csv" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" dependencies = [ "csv-core", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "csv-core" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" dependencies = [ "memchr", ] @@ -497,9 +595,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", ] @@ -513,6 +611,16 @@ dependencies = [ "generic-array", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -521,20 +629,20 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "doc-comment" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9" [[package]] name = "document-features" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" dependencies = [ "litrs", ] @@ -545,6 +653,15 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ecb" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7" +dependencies = [ + "cipher 0.4.4", +] + [[package]] name = "either" version = "1.15.0" @@ -569,7 +686,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -585,7 +702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -605,7 +722,8 @@ dependencies = [ "fltk", "holidays", "log", - "nom", + "lopdf", + "nom 7.1.3", "pdf", "polars", "regex", @@ -651,15 +769,15 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", @@ -675,7 +793,7 @@ dependencies = [ "crossbeam-channel", "fltk-sys", "paste", - "ttf-parser", + "ttf-parser 0.17.1", ] [[package]] @@ -790,28 +908,22 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.5+wasi-0.2.4", + "wasip2", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "glob" version = "0.3.3" @@ -850,9 +962,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.5" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -861,13 +973,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "holidays" @@ -877,16 +986,16 @@ checksum = "1dec0b9400fd67fab42168c54b7e662fcee1a15c689f8a9bac6e1d10be822c25" dependencies = [ "chrono", "once_cell", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "home" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -962,9 +1071,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -986,9 +1095,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", @@ -999,9 +1108,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -1012,11 +1121,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -1027,42 +1135,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -1093,12 +1197,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.16.1", ] [[package]] @@ -1111,14 +1215,13 @@ dependencies = [ ] [[package]] -name = "io-uring" -version = "0.7.10" +name = "inout" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "bitflags 2.9.4", - "cfg-if", - "libc", + "block-padding 0.3.3", + "generic-array", ] [[package]] @@ -1127,6 +1230,12 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.10.5" @@ -1142,13 +1251,54 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jiff" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +dependencies = [ + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-sys 0.61.2", +] + +[[package]] +name = "jiff-static" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68971ebff725b9e2ca27a601c5eb38a4c5d64422c4cbab0c535f248087eda5c2" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + [[package]] name = "jobserver" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "libc", ] @@ -1160,9 +1310,9 @@ checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" [[package]] name = "js-sys" -version = "0.3.78" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -1176,9 +1326,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libm" @@ -1194,31 +1344,62 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "litrs" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lopdf" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "c7184fdea2bc3cd272a1acec4030c321a8f9875e877b3f92a53f2f6033fdc289" +dependencies = [ + "aes 0.8.4", + "bitflags 2.10.0", + "cbc", + "chrono", + "ecb", + "encoding_rs", + "flate2", + "getrandom 0.3.4", + "indexmap", + "itoa", + "jiff", + "log", + "md-5", + "nom 8.0.0", + "nom_locate", + "rand 0.9.2", + "rangemap", + "rayon", + "sha2 0.10.9", + "stringprep", + "thiserror 2.0.17", + "time", + "ttf-parser 0.25.1", + "weezl", +] [[package]] name = "lz4" @@ -1239,6 +1420,16 @@ dependencies = [ "libc", ] +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "md5" version = "0.7.0" @@ -1247,9 +1438,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" @@ -1279,17 +1470,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "wasi", + "windows-sys 0.61.2", ] [[package]] @@ -1341,6 +1533,26 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "nom_locate" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d" +dependencies = [ + "bytecount", + "memchr", + "nom 8.0.0", +] + [[package]] name = "now" version = "0.1.3" @@ -1384,21 +1596,18 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "opaque-debug" version = "0.3.1" @@ -1407,11 +1616,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", @@ -1428,7 +1637,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -1439,9 +1648,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -1457,9 +1666,9 @@ checksum = "91409674c628d07a6b4b79cc877c6b63ba5ccbfbadddd77ca822f55069ed1bd4" [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -1467,15 +1676,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -1490,7 +1699,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f48644b2f4e9c3f3468d7c31fa75e9b823dfb167c8581ec15e90a90c34430d9" dependencies = [ - "aes", + "aes 0.6.0", "block-modes", "byteorder", "chrono", @@ -1506,7 +1715,7 @@ dependencies = [ "once_cell", "ordermap", "pdf_derive", - "sha2", + "sha2 0.9.9", "snafu", "stringprep", "weezl", @@ -1611,7 +1820,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae73d5b8e55decde670caba1cc82b61f14bfb9a72503198f0997d657a98dcfd6" dependencies = [ "ahash", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytemuck", "chrono", "comfy-table", @@ -1624,12 +1833,12 @@ dependencies = [ "polars-error", "polars-row", "polars-utils", - "rand", + "rand 0.8.5", "rand_distr", "rayon", "regex", "smartstring", - "thiserror", + "thiserror 1.0.69", "version_check", "xxhash-rust", ] @@ -1643,7 +1852,7 @@ dependencies = [ "arrow-format", "regex", "simdutf8", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1683,7 +1892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3555f759705be6dd0d3762d16a0b8787b2dc4da73b57465f3b2bf1a070ba8f20" dependencies = [ "ahash", - "bitflags 2.9.4", + "bitflags 2.10.0", "glob", "once_cell", "polars-arrow", @@ -1791,7 +2000,7 @@ dependencies = [ "polars-error", "polars-lazy", "polars-plan", - "rand", + "rand 0.8.5", "serde", "serde_json", "sqlparser", @@ -1835,11 +2044,26 @@ dependencies = [ "version_check", ] +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "potential_utf" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -1861,9 +2085,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] @@ -1880,9 +2104,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -1900,8 +2124,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -1911,7 +2145,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -1923,6 +2167,15 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.4", +] + [[package]] name = "rand_distr" version = "0.4.3" @@ -1930,9 +2183,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] +[[package]] +name = "rangemap" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbbbbea733ec66275512d0b9694f34102e7d5406fdbe2ad8d21b28dce92887c" + [[package]] name = "rayon" version = "1.11.0" @@ -1955,18 +2214,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", ] [[package]] name = "regex" -version = "1.11.2" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -1976,9 +2235,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -1987,9 +2246,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "reqwest" @@ -2037,12 +2296,6 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" -[[package]] -name = "rustc-demangle" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - [[package]] name = "rustc_version" version = "0.4.1" @@ -2058,11 +2311,11 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -2092,7 +2345,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -2107,7 +2360,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation", "core-foundation-sys", "libc", @@ -2126,28 +2379,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2180,19 +2443,36 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" + [[package]] name = "simdutf8" version = "0.1.5" @@ -2267,12 +2547,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -2286,9 +2566,9 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "static_assertions" @@ -2321,9 +2601,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.6.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum_macros" @@ -2331,11 +2611,11 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2351,9 +2631,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -2374,7 +2654,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -2420,33 +2700,33 @@ checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "tempfile" -version = "3.22.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] -name = "textwrap" -version = "0.9.0" +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "unicode-width 0.1.14", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.17", ] [[package]] @@ -2457,16 +2737,28 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] name = "time" -version = "0.3.43" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", + "itoa", "libc", "num-conv", "num_threads", @@ -2494,9 +2786,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -2519,19 +2811,16 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "pin-project-lite", - "slab", - "socket2 0.6.0", - "windows-sys 0.59.0", + "socket2 0.6.1", + "windows-sys 0.61.2", ] [[package]] @@ -2546,9 +2835,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -2565,9 +2854,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "pin-project-lite", "tracing-core", @@ -2575,9 +2864,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", ] @@ -2594,11 +2883,17 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + [[package]] name = "typenum" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicode-bidi" @@ -2608,24 +2903,24 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" [[package]] name = "unicode-segmentation" @@ -2635,15 +2930,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "url" @@ -2664,16 +2953,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] -name = "vcpkg" -version = "0.2.15" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[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" @@ -2696,29 +2985,20 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.5+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" -version = "1.0.0+wasi-0.2.4" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.101" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -2727,25 +3007,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.106", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-futures" -version = "0.4.51" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ "cfg-if", "js-sys", @@ -2756,9 +3022,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.101" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2766,31 +3032,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.101" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.106", - "wasm-bindgen-backend", + "syn 2.0.111", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.101" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.78" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -2798,9 +3064,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wild" @@ -2835,67 +3101,61 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.1.3", + "windows-link", "windows-result", "windows-strings", ] [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-link" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] @@ -2927,11 +3187,20 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.61.0" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -2958,13 +3227,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -2977,6 +3263,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -2989,6 +3281,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3001,12 +3299,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3019,6 +3329,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3031,6 +3347,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -3043,6 +3365,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3055,6 +3383,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winreg" version = "0.50.0" @@ -3067,15 +3401,15 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.45.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xxhash-rust" @@ -3085,11 +3419,10 @@ checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -3097,34 +3430,34 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] @@ -3144,15 +3477,15 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", "synstructure", ] [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -3161,9 +3494,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -3172,13 +3505,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.111", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3b16afc..ddbe835 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,10 @@ homepage = "https://github.com/jczaja/e-trade-tax-return-pl-helper" name = "etradeTaxReturnHelper" path = "src/main.rs" +[[bin]] +name = "etradeAnonymizer" +path = "src/anonymizer/anonymizer.rs" + [[bin]] name = "gen_exchange_rates" path = "src/bin/gen_exchange_rates.rs" @@ -35,8 +39,10 @@ serde = { version = "1.0.104", features = ["derive"] } roxmltree = "0.20.0" simple_logger = "4.0.0" log = "0.4.0" -clap = "~2.27.0" -regex = "1.3.3" +#clap = "~2.27.0" +clap = { version = "4.5.51", features = ["derive"] } +#regex = "1.3.3" +regex = "1.12.2" calamine = "0.22.1" wild = "2.2.0" fltk = { version = "=1.3.24", features = ["fltk-bundled"], optional = true } @@ -45,3 +51,7 @@ polars = "0.35.4" csv = "1.3.0" serde_json = { version = "=1.0.133", optional = true } holidays = { version = "0.1.0", default-features = false, features = ["PL"] } +lopdf = { version = "0.38.0" } + + + diff --git a/src/anonymizer/README.md b/src/anonymizer/README.md new file mode 100644 index 0000000..e69de29 diff --git a/src/anonymizer/anonymizer.rs b/src/anonymizer/anonymizer.rs new file mode 100644 index 0000000..adbfbde --- /dev/null +++ b/src/anonymizer/anonymizer.rs @@ -0,0 +1,108 @@ +// SPDX-FileCopyrightText: 2024-2025 RustInFinance +// SPDX-License-Identifier: BSD-3-Clause + +use clap::Parser; +use lopdf::{Document, Object, Stream, dictionary, content::{Content, Operation}}; +use regex::Regex; + +#[derive(Parser, Debug)] +#[command(author, version, about, long_about = None)] +struct Args { + /// Input PDF file path + #[arg(short, long)] + input: String, + + /// file path output + #[arg(short, long)] + output: String, +} + +/* +fn save_text_as_pdf(text: &str, output_path: &str) -> lopdf::Result<()> { + let mut doc = Document::with_version("1.4"); + + let pages_id = doc.new_object_id(); + let page_id = doc.new_object_id(); + // Font + let font_id = doc.add_object(dictionary! { + "Type" => "Font", + "Subtype" => "Type1", + "BaseFont" => "Helvetica", + }); + + // Content stream (jedna linia = jedna linia w PDF) + let mut content = Content { operations: vec![] }; + let mut y = 750.0; + for line in text.lines() { + content.operations.push(Operation::new("BT", vec![])); // Begin Text + content.operations.push(Operation::new("Tf", vec!["F1".into(), 12.into()])); // Font + content.operations.push(Operation::new("Td", vec![50.into(), y.into()])); // Position + content.operations.push(Operation::new("Tj", vec![Object::string_literal(line)])); // Text + content.operations.push(Operation::new("ET", vec![])); // End Text + y -= 15.0; + } + let content_stream = doc.add_object(Stream::new(dictionary! {}, content.encode().unwrap())); + + // Page + let page_id = doc.add_object(dictionary! { + "Type" => "Page", +// "Parent" => lopdf::Object::Reference(2), + "Parent" => Object::Reference(pages_id), + "Contents" => content_stream, + "Resources" => dictionary! { + "Font" => dictionary! { + "F1" => font_id, + } + } + }); + + // Pages root + let pages_id = doc.add_object(dictionary! { + "Type" => "Pages", + "Kids" => vec![page_id.into()], + "Count" => 1, + "MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()], + }); + + // Catalog + let catalog_id = doc.add_object(dictionary! { + "Type" => "Catalog", + "Pages" => pages_id, + }); + + doc.trailer.set("Root", catalog_id); + doc.save(output_path)?; + Ok(()) +} +*/ +fn main() { + let args = Args::parse(); + + println!("Input PDF: {}", args.input); + /* + // Load PDF + let mut doc = Document::load(&args.input).expect("Cannot load PDF file"); + println!("Output PDF: {}", args.output); + println!("Replace owner"); + let first_page = doc.extract_text(&[1]).expect("Unable to extract first page"); + println!("First page content: {}", first_page); + + // Next substring after "STATEMENT FOR:" is "\n\n" + let re = Regex::new(r"FOR:\n([^\n]+)\n").unwrap(); + let caps = re.captures(&first_page).unwrap(); + let name = &caps[1].trim(); + println!("OWNER: '{}'", name); +*/ +// let new_content = content.replace("JACEK CZAJA", "John Smith"); +// doc.change_page_content(page_id, new_content.as_bytes().to_vec()); +// } + + // Zapisz zmodyfikowany PDF +// doc.save(&args.output).expect("Nie można zapisać PDF"); +// save_text_as_pdf(&first_page, &args.output); + +// Save without modification works fine! +// Save on example.pdf PDF works fine! +// Save modified statement PDF does not work! + +} diff --git a/src/main.rs b/src/main.rs index 1c14b87..e15e626 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2022-2025 RustInFinance // SPDX-License-Identifier: BSD-3-Clause -use clap::{App, AppSettings, Arg}; +use clap::{Arg, Command}; use std::env; mod de; @@ -29,20 +29,19 @@ use logging::ResultExt; // TODO: Drag&Drop to work on MultiBrowser field // TODO: taxation of EUR instruments in US -fn create_cmd_line_pattern<'a, 'b>(myapp: App<'a, 'b>) -> App<'a, 'b> { +fn create_cmd_line_pattern(myapp: Command) -> Command { myapp .arg( - Arg::with_name("residency") + Arg::new("residency") .long("residency") .help("Country of residence e.g. pl , us ...") .value_name("FILE") - .takes_value(true) .default_value("pl"), ) .arg( - Arg::with_name("financial documents") + Arg::new("financial documents") .help("Brokerage statement PDFs and Gain & Losses xlsx documents\n\nBrokerege statements can be downloaded from:\n\thttps://edoc.etrade.com/e/t/onlinedocs/docsearch?doc_type=stmt\n\nGain&Losses documents can be downloaded from:\n\thttps://us.etrade.com/etx/sp/stockplan#/myAccount/gainsLosses\n") - .multiple(true) + .num_args(1..) .required(true), ) } @@ -61,15 +60,16 @@ fn main() { return; } } - - let myapp = App::new("etradeTaxHelper ".to_string() + VERSION) - .setting(AppSettings::ArgRequiredElseHelp); + + let myapp = Command::new("etradeTaxHelper") + .version(VERSION) + .arg_required_else_help(true); let matches = create_cmd_line_pattern(myapp).get_matches_from(wild::args()); let residency = matches - .value_of("residency") + .get_one::("residency") .expect_and_log("error getting residency value"); - let rd: Box = match residency { + let rd: Box = match residency.as_str() { "de" => Box::new(de::DE {}), "pl" => Box::new(pl::PL {}), "us" => Box::new(us::US {}), @@ -80,7 +80,7 @@ fn main() { }; let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names.\n\nBrokerege statements can be downloaded from:\n\nhttps://edoc.etrade.com/e/t/onlinedocs/docsearch?doc_type=stmt\n\n"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -107,7 +107,7 @@ fn main() { #[cfg(test)] mod tests { use super::*; - use clap::{App, ErrorKind}; + use clap::Command; #[test] fn test_exchange_rate_de() -> Result<(), String> { @@ -193,24 +193,16 @@ mod tests { #[test] fn test_cmdline_de() -> Result<(), clap::Error> { // Init Transactions - let myapp = App::new("E-trade tax helper"); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let myapp = Command::new("E-trade tax helper"); + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "--residency=de", "data/example.pdf", - ])?; - let residency = matches.value_of("residency").ok_or(clap::Error { - message: "Unable to get residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - })?; - match residency { + ]); + let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + match residency.as_str() { "de" => return Ok(()), - _ => clap::Error { - message: "Wrong residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - }, + _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), }; Ok(()) } @@ -218,56 +210,40 @@ mod tests { #[test] fn test_cmdline_pl() -> Result<(), clap::Error> { // Init Transactions - let myapp = App::new("E-trade tax helper"); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let myapp = Command::new("E-trade tax helper"); + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "--residency=pl", "data/example.pdf", - ])?; - let residency = matches.value_of("residency").ok_or(clap::Error { - message: "Unable to get residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - })?; - match residency { + ]); + let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + match residency.as_str() { "pl" => return Ok(()), - _ => clap::Error { - message: "Wrong residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - }, + _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), }; Ok(()) } #[test] fn test_cmdline_default() -> Result<(), clap::Error> { // Init Transactions - let myapp = App::new("E-trade tax helper"); - create_cmd_line_pattern(myapp).get_matches_from_safe(vec!["mytest", "data/example.pdf"])?; + let myapp = Command::new("E-trade tax helper"); + create_cmd_line_pattern(myapp).get_matches_from(vec!["mytest", "data/example.pdf"]); Ok(()) } #[test] fn test_cmdline_us() -> Result<(), clap::Error> { // Init Transactions - let myapp = App::new("E-trade tax helper"); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let myapp = Command::new("E-trade tax helper"); + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "--residency=us", "data/example.pdf", - ])?; - let residency = matches.value_of("residency").ok_or(clap::Error { - message: "Unable to get residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - })?; - match residency { + ]); + let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + match residency.as_str() { "us" => return Ok(()), - _ => clap::Error { - message: "Wrong residency value".to_owned(), - kind: ErrorKind::InvalidValue, - info: None, - }, + _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), }; Ok(()) } @@ -275,14 +251,18 @@ mod tests { #[test] fn test_unrecognized_file_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); + + let rd: Box = Box::new(pl::PL {}); // Check printed values or returned values? let matches = create_cmd_line_pattern(myapp) - .get_matches_from_safe(vec!["mytest", "unrecognized_file.txt"])?; + .get_matches_from(vec!["mytest", "unrecognized_file.txt"]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting financial documents names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -296,10 +276,11 @@ mod tests { #[ignore] fn test_dividends_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); // Check printed values or returned values? - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "data/Brokerage Statement - XXXX0848 - 202202.pdf", "data/Brokerage Statement - XXXX0848 - 202203.pdf", @@ -310,10 +291,10 @@ mod tests { "data/Brokerage Statement - XXXX0848 - 202211.pdf", "data/Brokerage Statement - XXXX0848 - 202212.pdf", "data/G&L_Collapsed.xlsx", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -339,18 +320,19 @@ mod tests { #[ignore] fn test_sold_dividends_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "data/Brokerage Statement - XXXX0848 - 202202.pdf", "data/Brokerage Statement - XXXX0848 - 202203.pdf", "data/Brokerage Statement - XXXX0848 - 202204.pdf", "data/Brokerage Statement - XXXX0848 - 202205.pdf", "data/G&L_Collapsed.xlsx", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -376,10 +358,11 @@ mod tests { #[ignore] fn test_sold_dividends_interests_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "etrade_data_2023/Brokerage Statement - XXXXX6557 - 202302.pdf", "etrade_data_2023/Brokerage Statement - XXXXX6557 - 202303.pdf", @@ -390,9 +373,9 @@ mod tests { "etrade_data_2023/MS_ClientStatements_6557_202311.pdf", "etrade_data_2023/MS_ClientStatements_6557_202312.pdf", "etrade_data_2023/G&L_Collapsed-2023.xlsx", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -417,15 +400,16 @@ mod tests { #[test] fn test_revolut_dividends_pln() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "revolut_data/trading-pnl-statement_2024-01-01_2024-08-04_pl-pl_8e8783.csv", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -450,15 +434,16 @@ mod tests { #[test] fn test_revolut_sold_and_dividends() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "revolut_data/trading-pnl-statement_2022-11-01_2024-09-01_pl-pl_e989f4.csv", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -483,15 +468,16 @@ mod tests { #[test] fn test_revolut_interests_taxation_pln() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "revolut_data/Revolut_30cze2023_27lis2023.csv", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -517,14 +503,15 @@ mod tests { #[ignore] fn test_sold_dividends_only_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); - let matches = create_cmd_line_pattern(myapp).get_matches_from_safe(vec![ + let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", "data/Brokerage Statement - XXXX0848 - 202206.pdf", - ])?; + ]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); @@ -550,12 +537,13 @@ mod tests { #[ignore] fn test_interest_adjustment_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = App::new("E-trade tax helper").setting(AppSettings::ArgRequiredElseHelp); + let myapp = Command::new("etradeTaxHelper") + .arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp) - .get_matches_from_safe(vec!["mytest", "data/example-interest-adj.pdf"])?; + .get_matches_from(vec!["mytest", "data/example-interest-adj.pdf"]); let pdfnames = matches - .values_of("financial documents") + .get_many::("financial documents") .expect_and_log("error getting brokarage statements pdfs names"); let pdfnames: Vec = pdfnames.map(|x| x.to_string()).collect(); From d876ec91169814194ac1684bcb3d7415507b05c7 Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Fri, 21 Nov 2025 08:56:51 +0100 Subject: [PATCH 2/3] - Bumped up clap --- src/anonymizer/anonymizer.rs | 50 +++++++++++++++--------------- src/main.rs | 60 ++++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 50 deletions(-) diff --git a/src/anonymizer/anonymizer.rs b/src/anonymizer/anonymizer.rs index adbfbde..68b9256 100644 --- a/src/anonymizer/anonymizer.rs +++ b/src/anonymizer/anonymizer.rs @@ -2,7 +2,10 @@ // SPDX-License-Identifier: BSD-3-Clause use clap::Parser; -use lopdf::{Document, Object, Stream, dictionary, content::{Content, Operation}}; +use lopdf::{ + content::{Content, Operation}, + dictionary, Document, Object, Stream, +}; use regex::Regex; #[derive(Parser, Debug)] @@ -12,7 +15,7 @@ struct Args { #[arg(short, long)] input: String, - /// file path output + /// file path output #[arg(short, long)] output: String, } @@ -80,29 +83,28 @@ fn main() { println!("Input PDF: {}", args.input); /* - // Load PDF - let mut doc = Document::load(&args.input).expect("Cannot load PDF file"); - println!("Output PDF: {}", args.output); - println!("Replace owner"); - let first_page = doc.extract_text(&[1]).expect("Unable to extract first page"); - println!("First page content: {}", first_page); + // Load PDF + let mut doc = Document::load(&args.input).expect("Cannot load PDF file"); + println!("Output PDF: {}", args.output); + println!("Replace owner"); + let first_page = doc.extract_text(&[1]).expect("Unable to extract first page"); + println!("First page content: {}", first_page); - // Next substring after "STATEMENT FOR:" is "\n\n" - let re = Regex::new(r"FOR:\n([^\n]+)\n").unwrap(); - let caps = re.captures(&first_page).unwrap(); - let name = &caps[1].trim(); - println!("OWNER: '{}'", name); -*/ -// let new_content = content.replace("JACEK CZAJA", "John Smith"); -// doc.change_page_content(page_id, new_content.as_bytes().to_vec()); -// } - - // Zapisz zmodyfikowany PDF -// doc.save(&args.output).expect("Nie można zapisać PDF"); -// save_text_as_pdf(&first_page, &args.output); + // Next substring after "STATEMENT FOR:" is "\n\n" + let re = Regex::new(r"FOR:\n([^\n]+)\n").unwrap(); + let caps = re.captures(&first_page).unwrap(); + let name = &caps[1].trim(); + println!("OWNER: '{}'", name); + */ + // let new_content = content.replace("JACEK CZAJA", "John Smith"); + // doc.change_page_content(page_id, new_content.as_bytes().to_vec()); + // } -// Save without modification works fine! -// Save on example.pdf PDF works fine! -// Save modified statement PDF does not work! + // Zapisz zmodyfikowany PDF + // doc.save(&args.output).expect("Nie można zapisać PDF"); + // save_text_as_pdf(&first_page, &args.output); + // Save without modification works fine! + // Save on example.pdf PDF works fine! + // Save modified statement PDF does not work! } diff --git a/src/main.rs b/src/main.rs index e15e626..7dbb99f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ fn main() { return; } } - + let myapp = Command::new("etradeTaxHelper") .version(VERSION) .arg_required_else_help(true); @@ -199,10 +199,16 @@ mod tests { "--residency=de", "data/example.pdf", ]); - let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + let residency = matches + .get_one::("residency") + .ok_or(clap::error::Error::new( + clap::error::ErrorKind::InvalidValue, + ))?; match residency.as_str() { "de" => return Ok(()), - _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), + _ => clap::error::Error::::new( + clap::error::ErrorKind::InvalidValue, + ), }; Ok(()) } @@ -216,10 +222,16 @@ mod tests { "--residency=pl", "data/example.pdf", ]); - let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + let residency = matches + .get_one::("residency") + .ok_or(clap::error::Error::new( + clap::error::ErrorKind::InvalidValue, + ))?; match residency.as_str() { "pl" => return Ok(()), - _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), + _ => clap::error::Error::::new( + clap::error::ErrorKind::InvalidValue, + ), }; Ok(()) } @@ -240,10 +252,16 @@ mod tests { "--residency=us", "data/example.pdf", ]); - let residency = matches.get_one::("residency").ok_or(clap::error::Error::new(clap::error::ErrorKind::InvalidValue))?; + let residency = matches + .get_one::("residency") + .ok_or(clap::error::Error::new( + clap::error::ErrorKind::InvalidValue, + ))?; match residency.as_str() { "us" => return Ok(()), - _ => clap::error::Error::::new(clap::error::ErrorKind::InvalidValue), + _ => clap::error::Error::::new( + clap::error::ErrorKind::InvalidValue, + ), }; Ok(()) } @@ -252,9 +270,7 @@ mod tests { fn test_unrecognized_file_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); - + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); // Check printed values or returned values? @@ -276,8 +292,7 @@ mod tests { #[ignore] fn test_dividends_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); // Check printed values or returned values? let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ @@ -320,8 +335,7 @@ mod tests { #[ignore] fn test_sold_dividends_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", @@ -358,8 +372,7 @@ mod tests { #[ignore] fn test_sold_dividends_interests_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ @@ -400,8 +413,7 @@ mod tests { #[test] fn test_revolut_dividends_pln() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ @@ -434,8 +446,7 @@ mod tests { #[test] fn test_revolut_sold_and_dividends() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ @@ -468,8 +479,7 @@ mod tests { #[test] fn test_revolut_interests_taxation_pln() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ @@ -503,8 +513,7 @@ mod tests { #[ignore] fn test_sold_dividends_only_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp).get_matches_from(vec![ "mytest", @@ -537,8 +546,7 @@ mod tests { #[ignore] fn test_interest_adjustment_taxation() -> Result<(), clap::Error> { // Get all brokerage with dividends only - let myapp = Command::new("etradeTaxHelper") - .arg_required_else_help(true); + let myapp = Command::new("etradeTaxHelper").arg_required_else_help(true); let rd: Box = Box::new(pl::PL {}); let matches = create_cmd_line_pattern(myapp) .get_matches_from(vec!["mytest", "data/example-interest-adj.pdf"]); From d2cc26d65da33ce636d89a5282768d1120c7900b Mon Sep 17 00:00:00 2001 From: Jacek Czaja Date: Sun, 14 Dec 2025 20:05:35 +0100 Subject: [PATCH 3/3] Remove not needed dependencies --- Cargo.lock | 330 +++-------------------------------- Cargo.toml | 6 - src/anonymizer/README.md | 0 src/anonymizer/anonymizer.rs | 110 ------------ 4 files changed, 23 insertions(+), 423 deletions(-) delete mode 100644 src/anonymizer/README.md delete mode 100644 src/anonymizer/anonymizer.rs diff --git a/Cargo.lock b/Cargo.lock index eecdab5..55a99c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -22,18 +22,7 @@ checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" dependencies = [ "aes-soft", "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", + "cipher", ] [[package]] @@ -42,7 +31,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" dependencies = [ - "cipher 0.2.5", + "cipher", "opaque-debug", ] @@ -52,7 +41,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" dependencies = [ - "cipher 0.2.5", + "cipher", "opaque-debug", ] @@ -216,23 +205,14 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - [[package]] name = "block-modes" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", + "block-padding", + "cipher", ] [[package]] @@ -241,27 +221,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array", -] - [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" -[[package]] -name = "bytecount" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" - [[package]] name = "bytemuck" version = "1.24.0" @@ -309,15 +274,6 @@ dependencies = [ "zip", ] -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "cc" version = "1.2.49" @@ -358,16 +314,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "4.5.53" @@ -553,16 +499,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - [[package]] name = "csv" version = "1.4.0" @@ -611,16 +547,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -653,15 +579,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" -[[package]] -name = "ecb" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "either" version = "1.15.0" @@ -722,8 +639,7 @@ dependencies = [ "fltk", "holidays", "log", - "lopdf", - "nom 7.1.3", + "nom", "pdf", "polars", "regex", @@ -793,7 +709,7 @@ dependencies = [ "crossbeam-channel", "fltk-sys", "paste", - "ttf-parser 0.17.1", + "ttf-parser", ] [[package]] @@ -891,9 +807,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.7" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" dependencies = [ "typenum", "version_check", @@ -986,7 +902,7 @@ checksum = "1dec0b9400fd67fab42168c54b7e662fcee1a15c689f8a9bac6e1d10be822c25" dependencies = [ "chrono", "once_cell", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -1214,16 +1130,6 @@ dependencies = [ "adler32", ] -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "block-padding 0.3.3", - "generic-array", -] - [[package]] name = "ipnet" version = "2.11.0" @@ -1251,47 +1157,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" -[[package]] -name = "jiff" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" -dependencies = [ - "jiff-static", - "jiff-tzdb-platform", - "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", - "windows-sys 0.61.2", -] - -[[package]] -name = "jiff-static" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - -[[package]] -name = "jiff-tzdb" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68971ebff725b9e2ca27a601c5eb38a4c5d64422c4cbab0c535f248087eda5c2" - -[[package]] -name = "jiff-tzdb-platform" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" -dependencies = [ - "jiff-tzdb", -] - [[package]] name = "jobserver" version = "0.1.34" @@ -1369,38 +1234,6 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "lopdf" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7184fdea2bc3cd272a1acec4030c321a8f9875e877b3f92a53f2f6033fdc289" -dependencies = [ - "aes 0.8.4", - "bitflags 2.10.0", - "cbc", - "chrono", - "ecb", - "encoding_rs", - "flate2", - "getrandom 0.3.4", - "indexmap", - "itoa", - "jiff", - "log", - "md-5", - "nom 8.0.0", - "nom_locate", - "rand 0.9.2", - "rangemap", - "rayon", - "sha2 0.10.9", - "stringprep", - "thiserror 2.0.17", - "time", - "ttf-parser 0.25.1", - "weezl", -] - [[package]] name = "lz4" version = "1.28.1" @@ -1420,16 +1253,6 @@ dependencies = [ "libc", ] -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest 0.10.7", -] - [[package]] name = "md5" version = "0.7.0" @@ -1533,26 +1356,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - -[[package]] -name = "nom_locate" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b577e2d69827c4740cba2b52efaad1c4cc7c73042860b199710b3575c68438d" -dependencies = [ - "bytecount", - "memchr", - "nom 8.0.0", -] - [[package]] name = "now" version = "0.1.3" @@ -1699,7 +1502,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f48644b2f4e9c3f3468d7c31fa75e9b823dfb167c8581ec15e90a90c34430d9" dependencies = [ - "aes 0.6.0", + "aes", "block-modes", "byteorder", "chrono", @@ -1715,7 +1518,7 @@ dependencies = [ "once_cell", "ordermap", "pdf_derive", - "sha2 0.9.9", + "sha2", "snafu", "stringprep", "weezl", @@ -1833,12 +1636,12 @@ dependencies = [ "polars-error", "polars-row", "polars-utils", - "rand 0.8.5", + "rand", "rand_distr", "rayon", "regex", "smartstring", - "thiserror 1.0.69", + "thiserror", "version_check", "xxhash-rust", ] @@ -1852,7 +1655,7 @@ dependencies = [ "arrow-format", "regex", "simdutf8", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2000,7 +1803,7 @@ dependencies = [ "polars-error", "polars-lazy", "polars-plan", - "rand 0.8.5", + "rand", "serde", "serde_json", "sqlparser", @@ -2044,21 +1847,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "portable-atomic" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" - -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - [[package]] name = "potential_utf" version = "0.1.4" @@ -2124,18 +1912,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_chacha", + "rand_core", ] [[package]] @@ -2145,17 +1923,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", + "rand_core", ] [[package]] @@ -2167,15 +1935,6 @@ dependencies = [ "getrandom 0.2.16", ] -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.4", -] - [[package]] name = "rand_distr" version = "0.4.3" @@ -2183,15 +1942,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] -[[package]] -name = "rangemap" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbbbbea733ec66275512d0b9694f34102e7d5406fdbe2ad8d21b28dce92887c" - [[package]] name = "rayon" version = "1.11.0" @@ -2443,24 +2196,13 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer 0.9.0", + "block-buffer", "cfg-if", "cpufeatures", - "digest 0.9.0", + "digest", "opaque-debug", ] -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "shlex" version = "1.3.0" @@ -2717,16 +2459,7 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" -dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl", ] [[package]] @@ -2740,17 +2473,6 @@ dependencies = [ "syn 2.0.111", ] -[[package]] -name = "thiserror-impl" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "time" version = "0.3.44" @@ -2883,12 +2605,6 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" -[[package]] -name = "ttf-parser" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" - [[package]] name = "typenum" version = "1.19.0" diff --git a/Cargo.toml b/Cargo.toml index ddbe835..84667ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,10 +17,6 @@ homepage = "https://github.com/jczaja/e-trade-tax-return-pl-helper" name = "etradeTaxReturnHelper" path = "src/main.rs" -[[bin]] -name = "etradeAnonymizer" -path = "src/anonymizer/anonymizer.rs" - [[bin]] name = "gen_exchange_rates" path = "src/bin/gen_exchange_rates.rs" @@ -51,7 +47,5 @@ polars = "0.35.4" csv = "1.3.0" serde_json = { version = "=1.0.133", optional = true } holidays = { version = "0.1.0", default-features = false, features = ["PL"] } -lopdf = { version = "0.38.0" } - diff --git a/src/anonymizer/README.md b/src/anonymizer/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/src/anonymizer/anonymizer.rs b/src/anonymizer/anonymizer.rs deleted file mode 100644 index 68b9256..0000000 --- a/src/anonymizer/anonymizer.rs +++ /dev/null @@ -1,110 +0,0 @@ -// SPDX-FileCopyrightText: 2024-2025 RustInFinance -// SPDX-License-Identifier: BSD-3-Clause - -use clap::Parser; -use lopdf::{ - content::{Content, Operation}, - dictionary, Document, Object, Stream, -}; -use regex::Regex; - -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -struct Args { - /// Input PDF file path - #[arg(short, long)] - input: String, - - /// file path output - #[arg(short, long)] - output: String, -} - -/* -fn save_text_as_pdf(text: &str, output_path: &str) -> lopdf::Result<()> { - let mut doc = Document::with_version("1.4"); - - let pages_id = doc.new_object_id(); - let page_id = doc.new_object_id(); - // Font - let font_id = doc.add_object(dictionary! { - "Type" => "Font", - "Subtype" => "Type1", - "BaseFont" => "Helvetica", - }); - - // Content stream (jedna linia = jedna linia w PDF) - let mut content = Content { operations: vec![] }; - let mut y = 750.0; - for line in text.lines() { - content.operations.push(Operation::new("BT", vec![])); // Begin Text - content.operations.push(Operation::new("Tf", vec!["F1".into(), 12.into()])); // Font - content.operations.push(Operation::new("Td", vec![50.into(), y.into()])); // Position - content.operations.push(Operation::new("Tj", vec![Object::string_literal(line)])); // Text - content.operations.push(Operation::new("ET", vec![])); // End Text - y -= 15.0; - } - let content_stream = doc.add_object(Stream::new(dictionary! {}, content.encode().unwrap())); - - // Page - let page_id = doc.add_object(dictionary! { - "Type" => "Page", -// "Parent" => lopdf::Object::Reference(2), - "Parent" => Object::Reference(pages_id), - "Contents" => content_stream, - "Resources" => dictionary! { - "Font" => dictionary! { - "F1" => font_id, - } - } - }); - - // Pages root - let pages_id = doc.add_object(dictionary! { - "Type" => "Pages", - "Kids" => vec![page_id.into()], - "Count" => 1, - "MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()], - }); - - // Catalog - let catalog_id = doc.add_object(dictionary! { - "Type" => "Catalog", - "Pages" => pages_id, - }); - - doc.trailer.set("Root", catalog_id); - doc.save(output_path)?; - Ok(()) -} -*/ -fn main() { - let args = Args::parse(); - - println!("Input PDF: {}", args.input); - /* - // Load PDF - let mut doc = Document::load(&args.input).expect("Cannot load PDF file"); - println!("Output PDF: {}", args.output); - println!("Replace owner"); - let first_page = doc.extract_text(&[1]).expect("Unable to extract first page"); - println!("First page content: {}", first_page); - - // Next substring after "STATEMENT FOR:" is "\n\n" - let re = Regex::new(r"FOR:\n([^\n]+)\n").unwrap(); - let caps = re.captures(&first_page).unwrap(); - let name = &caps[1].trim(); - println!("OWNER: '{}'", name); - */ - // let new_content = content.replace("JACEK CZAJA", "John Smith"); - // doc.change_page_content(page_id, new_content.as_bytes().to_vec()); - // } - - // Zapisz zmodyfikowany PDF - // doc.save(&args.output).expect("Nie można zapisać PDF"); - // save_text_as_pdf(&first_page, &args.output); - - // Save without modification works fine! - // Save on example.pdf PDF works fine! - // Save modified statement PDF does not work! -}