Update most dependencies.

This commit is contained in:
scoobybejesus 2023-10-19 14:37:46 -04:00
parent 47c3e35665
commit 4161280b4d
18 changed files with 422 additions and 370 deletions

673
Cargo.lock generated
View File

@ -3,27 +3,18 @@
version = 3 version = 3
[[package]] [[package]]
name = "addr2line" name = "android-tzdata"
version = "0.14.0" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
dependencies = [
"gimli",
]
[[package]] [[package]]
name = "adler" name = "android_system_properties"
version = "0.2.3" version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
[[package]]
name = "aho-corasick"
version = "0.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
dependencies = [ dependencies = [
"memchr", "libc",
] ]
[[package]] [[package]]
@ -35,18 +26,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "arrayref"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]] [[package]]
name = "atty" name = "atty"
version = "0.2.14" version = "0.2.14"
@ -60,64 +39,27 @@ dependencies = [
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.0.1" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598"
dependencies = [
"addr2line",
"cfg-if 1.0.0",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]]
name = "base64"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "1.2.1" version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "blake2b_simd" name = "bitflags"
version = "0.5.11" version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
dependencies = [
"arrayref",
"arrayvec",
"constant_time_eq",
]
[[package]] [[package]]
name = "bstr" name = "bumpalo"
version = "0.2.14" version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
dependencies = [
"lazy_static",
"memchr",
"regex-automata",
"serde",
]
[[package]]
name = "byteorder"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]] [[package]]
name = "cassowary" name = "cassowary"
@ -127,9 +69,12 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.0.65" version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
@ -145,16 +90,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.19" version = "0.4.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
dependencies = [ dependencies = [
"libc", "android-tzdata",
"num-integer", "iana-time-zone",
"js-sys",
"num-traits", "num-traits",
"serde", "serde",
"time", "wasm-bindgen",
"winapi", "windows-targets",
] ]
[[package]] [[package]]
@ -165,7 +111,7 @@ checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"atty", "atty",
"bitflags", "bitflags 1.3.2",
"strsim", "strsim",
"textwrap", "textwrap",
"unicode-width", "unicode-width",
@ -173,25 +119,25 @@ dependencies = [
] ]
[[package]] [[package]]
name = "constant_time_eq" name = "clipboard-win"
version = "0.1.5" version = "4.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362"
[[package]]
name = "crossbeam-utils"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
dependencies = [ dependencies = [
"autocfg", "error-code",
"cfg-if 1.0.0", "str-buf",
"lazy_static", "winapi",
] ]
[[package]]
name = "core-foundation-sys"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]] [[package]]
name = "crptls" name = "crptls"
version = "0.1.1" version = "0.2.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"csv", "csv",
@ -203,7 +149,7 @@ dependencies = [
[[package]] [[package]]
name = "cryptools" name = "cryptools"
version = "0.11.1" version = "0.12.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"crptls", "crptls",
@ -218,11 +164,10 @@ dependencies = [
[[package]] [[package]]
name = "csv" name = "csv"
version = "1.1.5" version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97" checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
dependencies = [ dependencies = [
"bstr",
"csv-core", "csv-core",
"itoa", "itoa",
"ryu", "ryu",
@ -231,9 +176,9 @@ dependencies = [
[[package]] [[package]]
name = "csv-core" name = "csv-core"
version = "0.1.10" version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@ -244,7 +189,7 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a8ab77e91baeb15034c3be91e87bff4665c9036216148e4996d9a9f5792114d" checksum = "5a8ab77e91baeb15034c3be91e87bff4665c9036216148e4996d9a9f5792114d"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"cc", "cc",
"libc", "libc",
"ord_subset", "ord_subset",
@ -253,81 +198,62 @@ dependencies = [
] ]
[[package]] [[package]]
name = "dirs" name = "deranged"
version = "2.0.2" version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
dependencies = [ dependencies = [
"cfg-if 0.1.10", "powerfmt",
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
dependencies = [
"libc",
"redox_users",
"winapi",
] ]
[[package]] [[package]]
name = "dotenv" name = "dotenv"
version = "0.14.1" version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4424bad868b0ffe6ae351ee463526ba625bbca817978293bbe6bb7dc1804a175" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
dependencies = [
"failure",
"lazy_static",
"regex",
]
[[package]] [[package]]
name = "either" name = "either"
version = "1.6.1" version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]] [[package]]
name = "failure" name = "endian-type"
version = "0.1.8" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
dependencies = [
"backtrace",
"failure_derive",
]
[[package]] [[package]]
name = "failure_derive" name = "errno"
version = "0.1.8" version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860"
dependencies = [ dependencies = [
"proc-macro2 1.0.24",
"quote 1.0.7",
"syn 1.0.53",
"synstructure",
]
[[package]]
name = "getrandom"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
dependencies = [
"cfg-if 0.1.10",
"libc", "libc",
"wasi 0.9.0+wasi-snapshot-preview1", "windows-sys",
] ]
[[package]] [[package]]
name = "gimli" name = "error-code"
version = "0.23.0" version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21"
dependencies = [
"libc",
"str-buf",
]
[[package]]
name = "fd-lock"
version = "3.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5"
dependencies = [
"cfg-if 1.0.0",
"rustix",
"windows-sys",
]
[[package]] [[package]]
name = "heck" name = "heck"
@ -347,6 +273,38 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "home"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
dependencies = [
"windows-sys",
]
[[package]]
name = "iana-time-zone"
version = "0.1.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]] [[package]]
name = "itertools" name = "itertools"
version = "0.8.2" version = "0.8.2"
@ -358,21 +316,30 @@ dependencies = [
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "0.4.6" version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]] [[package]]
name = "lazy_static" name = "js-sys"
version = "1.4.0" version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.80" version = "0.2.149"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
[[package]]
name = "linux-raw-sys"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f"
[[package]] [[package]]
name = "log" name = "log"
@ -390,36 +357,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]] [[package]]
name = "miniz_oxide" name = "nibble_vec"
version = "0.4.3" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
dependencies = [ dependencies = [
"adler", "smallvec",
"autocfg",
] ]
[[package]] [[package]]
name = "nix" name = "nix"
version = "0.14.1" version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"cc", "cfg-if 1.0.0",
"cfg-if 0.1.10",
"libc", "libc",
"void",
]
[[package]]
name = "num-integer"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [
"autocfg",
"num-traits",
] ]
[[package]] [[package]]
@ -438,10 +392,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
[[package]] [[package]]
name = "object" name = "once_cell"
version = "0.22.0" version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]] [[package]]
name = "ord_subset" name = "ord_subset"
@ -449,22 +403,28 @@ version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7ce14664caf5b27f5656ff727defd68ae1eb75ef3c4d95259361df1eb376bef" checksum = "d7ce14664caf5b27f5656ff727defd68ae1eb75ef3c4d95259361df1eb376bef"
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.30" version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [ dependencies = [
"unicode-xid 0.1.0", "unicode-xid",
] ]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.24" version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [ dependencies = [
"unicode-xid 0.2.1", "unicode-ident",
] ]
[[package]] [[package]]
@ -478,11 +438,21 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.7" version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [ dependencies = [
"proc-macro2 1.0.24", "proc-macro2 1.0.69",
]
[[package]]
name = "radix_trie"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
dependencies = [
"endian-type",
"nibble_vec",
] ]
[[package]] [[package]]
@ -500,62 +470,6 @@ dependencies = [
"redox_syscall", "redox_syscall",
] ]
[[package]]
name = "redox_users"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
dependencies = [
"getrandom",
"redox_syscall",
"rust-argon2",
]
[[package]]
name = "regex"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
"thread_local",
]
[[package]]
name = "regex-automata"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
dependencies = [
"byteorder",
]
[[package]]
name = "regex-syntax"
version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
[[package]]
name = "rust-argon2"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
dependencies = [
"base64",
"blake2b_simd",
"constant_time_eq",
"crossbeam-utils",
]
[[package]]
name = "rustc-demangle"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232"
[[package]] [[package]]
name = "rustc-serialize" name = "rustc-serialize"
version = "0.3.24" version = "0.3.24"
@ -563,17 +477,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
[[package]] [[package]]
name = "rustyline" name = "rustix"
version = "5.0.6" version = "0.38.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a23cb19702a8d6afb6edb3c842386e680d4883760e0df74e6848e23c2a87a635" checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0"
dependencies = [ dependencies = [
"cfg-if 0.1.10", "bitflags 2.4.1",
"dirs", "errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
[[package]]
name = "rustyline"
version = "12.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "994eca4bca05c87e86e15d90fc7a91d1be64b4482b38cb2d27474568fe7c9db9"
dependencies = [
"bitflags 2.4.1",
"cfg-if 1.0.0",
"clipboard-win",
"fd-lock",
"home",
"libc", "libc",
"log", "log",
"memchr", "memchr",
"nix", "nix",
"radix_trie",
"scopeguard",
"unicode-segmentation", "unicode-segmentation",
"unicode-width", "unicode-width",
"utf8parse", "utf8parse",
@ -587,25 +519,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]] [[package]]
name = "serde" name = "scopeguard"
version = "1.0.117" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.117" version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [ dependencies = [
"proc-macro2 1.0.24", "proc-macro2 1.0.69",
"quote 1.0.7", "quote 1.0.33",
"syn 1.0.53", "syn 2.0.38",
] ]
[[package]]
name = "smallvec"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
[[package]]
name = "str-buf"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0"
[[package]] [[package]]
name = "strsim" name = "strsim"
version = "0.8.0" version = "0.8.0"
@ -642,30 +592,18 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [ dependencies = [
"proc-macro2 0.4.30", "proc-macro2 0.4.30",
"quote 0.6.13", "quote 0.6.13",
"unicode-xid 0.1.0", "unicode-xid",
] ]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.53" version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8833e20724c24de12bbaba5ad230ea61c3eafb05b881c7c9d3cfe8638b187e68" checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [ dependencies = [
"proc-macro2 1.0.24", "proc-macro2 1.0.69",
"quote 1.0.7", "quote 1.0.33",
"unicode-xid 0.2.1", "unicode-ident",
]
[[package]]
name = "synstructure"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
dependencies = [
"proc-macro2 1.0.24",
"quote 1.0.7",
"syn 1.0.53",
"unicode-xid 0.2.1",
] ]
[[package]] [[package]]
@ -690,32 +628,30 @@ dependencies = [
] ]
[[package]] [[package]]
name = "thread_local" name = "time"
version = "1.0.1" version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
dependencies = [ dependencies = [
"lazy_static", "deranged",
"powerfmt",
"serde",
"time-core",
] ]
[[package]] [[package]]
name = "time" name = "time-core"
version = "0.1.44" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
[[package]] [[package]]
name = "tui" name = "tui"
version = "0.5.1" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ff64c925f5e20d7a393c598a33b6afc9c9942e7ebc530085588f5b7667ea559" checksum = "6b871b61f4c4b81e630215cd12e0ec29953d4545898e21a9e023b7520a74a9f9"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"cassowary", "cassowary",
"either", "either",
"itertools", "itertools",
@ -725,6 +661,12 @@ dependencies = [
"unicode-width", "unicode-width",
] ]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]] [[package]]
name = "unicode-segmentation" name = "unicode-segmentation"
version = "1.7.1" version = "1.7.1"
@ -744,16 +686,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]] [[package]]
name = "unicode-xid" name = "utf8parse"
version = "0.2.1" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "utf8parse"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d"
[[package]] [[package]]
name = "vec_map" name = "vec_map"
@ -762,22 +698,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]] [[package]]
name = "void" name = "wasm-bindgen"
version = "1.0.2" version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
]
[[package]] [[package]]
name = "wasi" name = "wasm-bindgen-backend"
version = "0.9.0+wasi-snapshot-preview1" version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 2.0.38",
"wasm-bindgen-shared",
]
[[package]] [[package]]
name = "wasi" name = "wasm-bindgen-macro"
version = "0.10.0+wasi-snapshot-preview1" version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote 1.0.33",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2 1.0.69",
"quote 1.0.33",
"syn 2.0.38",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]] [[package]]
name = "winapi" name = "winapi"
@ -800,3 +772,78 @@ name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-core"
version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "cryptools" name = "cryptools"
version = "0.11.1" version = "0.12.0"
authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"] authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"]
edition = "2018" edition = "2018"
description = "Command-line utility for processing cryptocurrency transactions into 'lots' and 'movements'." description = "Command-line utility for processing cryptocurrency transactions into 'lots' and 'movements'."
@ -20,14 +20,14 @@ path = "src/main.rs"
[dependencies] [dependencies]
crptls = { path = "crptls" } crptls = { path = "crptls" }
csv = "1.0.0" csv = "1.3.0"
decimal = "2.1.0" decimal = "2.1.0"
chrono = { version = "0.4", features = ["serde"] } chrono = { version = "0.4.31", features = ["serde"] }
structopt = "0.2.10" structopt = "0.2.10"
rustyline = "5.0.0" rustyline = "12.0.0"
tui = { version = "0.5", optional = true } tui = { version = "0.8", optional = true, features = ['termion'] }
termion = { version = "1.5", optional = true } termion = { version = "1.5", optional = true }
dotenv = "0.14.1" dotenv = "0.15.0"
[profile.release] [profile.release]
lto = true lto = true

View File

@ -1,13 +1,13 @@
[package] [package]
name = "crptls" name = "crptls"
version = "0.1.1" version = "0.2.0"
authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"] authors = ["scoobybejesus <scoobybejesus@users.noreply.github.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
decimal = "2.0.4" decimal = "2.1.0"
chrono = { version = "0.4", features = ["serde"] } chrono = { version = "0.4.31", features = ["serde"] }
csv = "1.0.0" csv = "1.3.0"
serde = { version = "1.0.75", features = ["derive"] } serde = { version = "1.0.189", features = ["derive"] }
serde_derive = "1.0.75" serde_derive = "1.0.189"
time = "0.1.42" time = "0.3.30"

View File

@ -4,10 +4,10 @@
use std::rc::{Rc, Weak}; use std::rc::{Rc, Weak};
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::fmt; use std::fmt;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::error::Error; use std::error::Error;
use chrono::{NaiveDate}; use chrono::NaiveDate;
use decimal::d128; use decimal::d128;
use serde_derive::{Serialize, Deserialize}; use serde_derive::{Serialize, Deserialize};
@ -207,7 +207,6 @@ impl Movement {
txns_map: &HashMap<u32, Transaction> txns_map: &HashMap<u32, Transaction>
) -> Term { ) -> Term {
use time::Duration;
let ar = ar_map.get(&self.action_record_key).unwrap(); let ar = ar_map.get(&self.action_record_key).unwrap();
let lot = Self::get_lot(&self, acct_map, ar_map); let lot = Self::get_lot(&self, acct_map, ar_map);
@ -220,7 +219,7 @@ impl Movement {
let txn = txns_map.get(&self.transaction_key).unwrap(); let txn = txns_map.get(&self.transaction_key).unwrap();
if txn.action_record_idx_vec.len() == 2 { if txn.action_record_idx_vec.len() == 2 {
let lot_date_for_basis_purposes = lot.date_for_basis_purposes; let lot_date_for_basis_purposes = lot.date_for_basis_purposes;
if self.date.signed_duration_since(lot_date_for_basis_purposes) > Duration::days(365) { if self.date.signed_duration_since(lot_date_for_basis_purposes) > chrono::Duration::days(365) {
return Term::LT return Term::LT
} }
return Term::ST return Term::ST
@ -229,7 +228,7 @@ impl Movement {
// For a single-`action record` `transaction`, term is meaningless, but it is being shown // For a single-`action record` `transaction`, term is meaningless, but it is being shown
// in the context of the holding period, in the event it were sold "today". // in the context of the holding period, in the event it were sold "today".
let today: NaiveDate = chrono::Local::now().naive_utc().date(); let today: NaiveDate = chrono::Local::now().naive_utc().date();
if today.signed_duration_since(lot.date_for_basis_purposes) > Duration::days(365) { if today.signed_duration_since(lot.date_for_basis_purposes) > chrono::Duration::days(365) {
Term::LT Term::LT
} }
else { else {
@ -241,7 +240,7 @@ impl Movement {
let lot_date_for_basis_purposes = lot.date_for_basis_purposes; let lot_date_for_basis_purposes = lot.date_for_basis_purposes;
if self.date.signed_duration_since(lot_date_for_basis_purposes) > Duration::days(365) { if self.date.signed_duration_since(lot_date_for_basis_purposes) > chrono::Duration::days(365) {
return Term::LT return Term::LT
} }
Term::ST Term::ST

View File

@ -4,7 +4,7 @@
use std::path::PathBuf; use std::path::PathBuf;
use std::error::Error; use std::error::Error;
use std::collections::{HashMap}; use std::collections::HashMap;
use chrono::NaiveDate; use chrono::NaiveDate;

View File

@ -1,18 +1,18 @@
// Copyright (c) 2017-2020, scoobybejesus // Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::rc::{Rc}; use std::rc::Rc;
use std::cell::{RefCell, Ref, Cell}; use std::cell::{RefCell, Ref, Cell};
use std::collections::{HashMap}; use std::collections::HashMap;
use std::error::Error; use std::error::Error;
use decimal::d128; use decimal::d128;
use crate::core_functions::{ImportProcessParameters}; use crate::core_functions::ImportProcessParameters;
use crate::transaction::{Transaction, ActionRecord, TxType, Polarity, TxHasMargin}; use crate::transaction::{Transaction, ActionRecord, TxType, Polarity, TxHasMargin};
use crate::account::{Account, RawAccount, Lot, Movement}; use crate::account::{Account, RawAccount, Lot, Movement};
use crate::costing_method::{InventoryCostingMethod}; use crate::costing_method::InventoryCostingMethod;
use crate::decimal_utils::{round_d128_1e8}; use crate::decimal_utils::round_d128_1e8;
/// This is probably the most important function in the whole program. Based on the data in the CSV Input File, /// This is probably the most important function in the whole program. Based on the data in the CSV Input File,
/// the `account`s and `transaction`s will be created. Once the `account`s and `transaction`s have been created, both /// the `account`s and `transaction`s will be created. Once the `account`s and `transaction`s have been created, both
@ -378,6 +378,7 @@ pub(crate) fn create_lots_and_movements(
vec_of_indexes vec_of_indexes
} }
#[allow(suspicious_double_ref_op)]
fn get_lifo_by_lot_basis_date(list_of_lots: &Ref<Vec<Rc<Lot>>>) -> Vec<usize> { fn get_lifo_by_lot_basis_date(list_of_lots: &Ref<Vec<Rc<Lot>>>) -> Vec<usize> {
let mut reordered_vec = list_of_lots.clone().to_vec(); let mut reordered_vec = list_of_lots.clone().to_vec();
let length = reordered_vec.len(); let length = reordered_vec.len();
@ -403,6 +404,7 @@ pub(crate) fn create_lots_and_movements(
vec_of_indexes vec_of_indexes
} }
#[allow(suspicious_double_ref_op)]
fn get_fifo_by_lot_basis_date(list_of_lots: &Ref<Vec<Rc<Lot>>>) -> Vec<usize> { fn get_fifo_by_lot_basis_date(list_of_lots: &Ref<Vec<Rc<Lot>>>) -> Vec<usize> {
let mut reordered_vec = list_of_lots.clone().to_vec(); let mut reordered_vec = list_of_lots.clone().to_vec();
let length = reordered_vec.len(); let length = reordered_vec.len();

View File

@ -4,8 +4,8 @@
use std::error::Error; use std::error::Error;
use std::process; use std::process;
use std::fs::File; use std::fs::File;
use std::cell::{RefCell}; use std::cell::RefCell;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use chrono::NaiveDate; use chrono::NaiveDate;
@ -13,7 +13,7 @@ use decimal::d128;
use crate::transaction::{Transaction, ActionRecord}; use crate::transaction::{Transaction, ActionRecord};
use crate::account::{Account, RawAccount}; use crate::account::{Account, RawAccount};
use crate::decimal_utils::{round_d128_1e8}; use crate::decimal_utils::round_d128_1e8;
pub fn import_from_csv( pub fn import_from_csv(

View File

@ -1,7 +1,7 @@
// Copyright (c) 2017-2020, scoobybejesus // Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::collections::{HashMap}; use std::collections::HashMap;
use std::error::Error; use std::error::Error;
use chrono::NaiveDate; use chrono::NaiveDate;
@ -9,7 +9,7 @@ use decimal::d128;
use crate::transaction::{Transaction, TxType, ActionRecord, Polarity}; use crate::transaction::{Transaction, TxType, ActionRecord, Polarity};
use crate::account::{Account, RawAccount}; use crate::account::{Account, RawAccount};
use crate::decimal_utils::{round_d128_1e2}; use crate::decimal_utils::round_d128_1e2;
pub(crate) fn add_cost_basis_to_movements( pub(crate) fn add_cost_basis_to_movements(
home_currency: &String, home_currency: &String,

View File

@ -1,11 +1,11 @@
// Copyright (c) 2017-2020, scoobybejesus // Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::rc::{Rc}; use std::rc::Rc;
use std::cell::{RefCell}; use std::cell::RefCell;
use std::process; use std::process;
use std::fmt; use std::fmt;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::error::Error; use std::error::Error;
use decimal::d128; use decimal::d128;

View File

@ -9,16 +9,14 @@ use std::fs::File;
use chrono::NaiveDate; use chrono::NaiveDate;
use rustyline::completion::{Completer, FilenameCompleter, Pair}; use rustyline::completion::{Completer, FilenameCompleter, Pair};
use rustyline::validate::Validator;
use rustyline::{CompletionType, Config, Context, EditMode, Editor, Helper}; use rustyline::{CompletionType, Config, Context, EditMode, Editor, Helper};
use rustyline::config::OutputStreamType; use rustyline::hint::{Hinter, Hint};
use rustyline::hint::{Hinter};
use rustyline::error::ReadlineError; use rustyline::error::ReadlineError;
use rustyline::highlight::{Highlighter}; use rustyline::highlight::Highlighter;
use crptls::costing_method::InventoryCostingMethod; use crptls::costing_method::InventoryCostingMethod;
// use crate::string_utils;
pub fn choose_file_for_import(flag_to_accept_cli_args: bool) -> Result<PathBuf, Box<dyn Error>> { pub fn choose_file_for_import(flag_to_accept_cli_args: bool) -> Result<PathBuf, Box<dyn Error>> {
@ -74,9 +72,16 @@ fn _get_path() -> Result<(String, bool), Box<dyn Error>> {
} }
} }
impl Hinter for MyHelper {} impl Hint for MyHelper {
fn display(&self) -> &str { todo!() }
fn completion(&self) -> Option<&str> { todo!() }
}
impl Hinter for MyHelper {
type Hint = MyHelper;
}
impl Highlighter for MyHelper {} impl Highlighter for MyHelper {}
impl Helper for MyHelper {} impl Helper for MyHelper {}
impl Validator for MyHelper {}
let h = MyHelper { let h = MyHelper {
completer: FilenameCompleter::new(), completer: FilenameCompleter::new(),
@ -87,11 +92,10 @@ fn _get_path() -> Result<(String, bool), Box<dyn Error>> {
.history_ignore_space(true) .history_ignore_space(true)
.completion_type(CompletionType::Circular) .completion_type(CompletionType::Circular)
.edit_mode(EditMode::Vi) .edit_mode(EditMode::Vi)
.output_stream(OutputStreamType::Stdout)
.build(); .build();
let count = 1; let count = 1;
let mut rl = Editor::with_config(config); let mut rl = Editor::with_config(config)?;
let p = format!("{}> ", count); let p = format!("{}> ", count);
rl.set_helper(Some(h)); rl.set_helper(Some(h));
rl.helper_mut().unwrap().colored_prompt = format!("\x1b[1;32m{}\x1b[0m", p); rl.helper_mut().unwrap().colored_prompt = format!("\x1b[1;32m{}\x1b[0m", p);

View File

@ -2,11 +2,11 @@
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::error::Error; use std::error::Error;
use std::collections::{HashMap}; use std::collections::HashMap;
use crptls::transaction::{Transaction, ActionRecord}; use crptls::transaction::{Transaction, ActionRecord};
use crptls::account::{Account, RawAccount}; use crptls::account::{Account, RawAccount};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
use crate::export::{export_csv, export_txt, export_je}; use crate::export::{export_csv, export_txt, export_je};

View File

@ -2,7 +2,7 @@
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::fs::File; use std::fs::File;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use std::error::Error; use std::error::Error;
@ -11,7 +11,7 @@ use chrono::NaiveDate;
use crptls::transaction::{ActionRecord, Polarity, Transaction, TxType}; use crptls::transaction::{ActionRecord, Polarity, Transaction, TxType};
use crptls::account::{Account, RawAccount, Term}; use crptls::account::{Account, RawAccount, Term};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
pub fn _1_account_sums_to_csv( pub fn _1_account_sums_to_csv(

View File

@ -1,8 +1,8 @@
// Copyright (c) 2017-2020, scoobybejesus // Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::fs::{OpenOptions}; use std::fs::OpenOptions;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use std::error::Error; use std::error::Error;
use std::io::prelude::Write; use std::io::prelude::Write;
@ -11,7 +11,7 @@ use decimal::d128;
use crptls::transaction::{Transaction, ActionRecord, Polarity, TxType}; use crptls::transaction::{Transaction, ActionRecord, Polarity, TxType};
use crptls::account::{Account, RawAccount, Term}; use crptls::account::{Account, RawAccount, Term};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
pub fn prepare_non_lk_journal_entries( pub fn prepare_non_lk_journal_entries(

View File

@ -1,8 +1,8 @@
// Copyright (c) 2017-2020, scoobybejesus // Copyright (c) 2017-2020, scoobybejesus
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::fs::{OpenOptions}; use std::fs::OpenOptions;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;
use std::error::Error; use std::error::Error;
use std::io::prelude::Write; use std::io::prelude::Write;
@ -11,7 +11,7 @@ use decimal::d128;
use crptls::transaction::{Transaction, ActionRecord}; use crptls::transaction::{Transaction, ActionRecord};
use crptls::account::{Account, RawAccount}; use crptls::account::{Account, RawAccount};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
pub fn _1_account_lot_detail_to_txt( pub fn _1_account_lot_detail_to_txt(

View File

@ -2,11 +2,11 @@
// Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt // Redistributions must include the license: https://github.com/scoobybejesus/cryptools/blob/master/LEGAL.txt
use std::error::Error; use std::error::Error;
use std::collections::{HashMap}; use std::collections::HashMap;
use crptls::transaction::{Transaction, ActionRecord}; use crptls::transaction::{Transaction, ActionRecord};
use crptls::account::{Account, RawAccount}; use crptls::account::{Account, RawAccount};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
use crate::export::{export_csv, export_je, export_txt}; use crate::export::{export_csv, export_je, export_txt};

View File

@ -3,7 +3,7 @@
use std::io; use std::io;
use std::time::Duration; use std::time::Duration;
use std::collections::{HashMap}; use std::collections::HashMap;
use std::error::Error; use std::error::Error;
use tui::Terminal; use tui::Terminal;
@ -15,7 +15,7 @@ use termion::event::Key;
use crptls::transaction::{Transaction, ActionRecord}; use crptls::transaction::{Transaction, ActionRecord};
use crptls::account::{Account, RawAccount}; use crptls::account::{Account, RawAccount};
use crptls::core_functions::{ImportProcessParameters}; use crptls::core_functions::ImportProcessParameters;
use crate::mytui::event::{Events, Event, Config}; use crate::mytui::event::{Events, Event, Config};
use crate::mytui::ui as ui; use crate::mytui::ui as ui;

View File

@ -7,7 +7,7 @@ use std::error::Error;
use crptls::costing_method::InventoryCostingMethod; use crptls::costing_method::InventoryCostingMethod;
use crate::cli_user_choices; use crate::cli_user_choices;
use crate::setup::{ArgsForImportVarsTBD}; use crate::setup::ArgsForImportVarsTBD;
pub(crate) fn skip_wizard(args: ArgsForImportVarsTBD) -> Result<( pub(crate) fn skip_wizard(args: ArgsForImportVarsTBD) -> Result<(

View File

@ -9,7 +9,7 @@ use std::path::PathBuf;
use crptls::costing_method::InventoryCostingMethod; use crptls::costing_method::InventoryCostingMethod;
use crate::cli_user_choices; use crate::cli_user_choices;
use crate::setup::{ArgsForImportVarsTBD}; use crate::setup::ArgsForImportVarsTBD;
pub(crate) fn wizard(args: ArgsForImportVarsTBD) -> Result<( pub(crate) fn wizard(args: ArgsForImportVarsTBD) -> Result<(