diff --git a/.~lock.file.xlsx# b/.~lock.file.xlsx# new file mode 100644 index 0000000..7deebf5 --- /dev/null +++ b/.~lock.file.xlsx# @@ -0,0 +1 @@ +,vaddio,vaddiodemo,09.12.2021 15:30,file:///home/vaddio/.config/libreoffice/4; \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index c70d4dd..9dc9389 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,6 +52,12 @@ dependencies = [ "zip", ] +[[package]] +name = "cc" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" + [[package]] name = "cfg-if" version = "1.0.0" @@ -163,6 +169,7 @@ version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cafc7c74096c336d9d27145f7ebd4f4b6f95ba16aa5a282387267e6925cb58" dependencies = [ + "cc", "pkg-config", "vcpkg", ] @@ -253,9 +260,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.26.2" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4dc548c68ef586f0f623263ca633733d596d15fbcd1b9cb97babf98adc487" +checksum = "4ba4d3462c8b2e4d7f4fcfcf2b296dc6b65404fbbc7b63daa37fd485c149daf7" dependencies = [ "bitflags", "fallible-iterator", diff --git a/Cargo.toml b/Cargo.toml index c959018..3463701 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] calamine = "0.18.0" chrono = "0.4.19" -rusqlite = "0.26.2" +rusqlite = { version = "0.26.3", features = ["bundled"] } smallvec = "1.7.0" -[profile.release] -lto = true -codegen-units = 1 +#[profile.release] +#lto = true +#codegen-units = 1 diff --git a/data.db b/data.db index f4c8e00..ee06775 100644 Binary files a/data.db and b/data.db differ diff --git a/src/main.rs b/src/main.rs index 125cf90..f4a534c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,10 +41,10 @@ fn main() -> Result<(), Box> { let year = datestring[0..4].parse::().unwrap(); let month = datestring[5..].parse::().unwrap(); data_vec.push(Data { - description: String::from(row[45].get_string().unwrap()), - sku: String::from(row[34].get_string().unwrap()), - level2: String::from(row[30].get_string().unwrap()), - level3: String::from(row[31].get_string().unwrap()), + description: String::from(row[46].get_string().unwrap().replace("\"", "")), + sku: String::from(row[35].get_string().unwrap()), + level2: String::from(row[31].get_string().unwrap()), + level3: String::from(row[32].get_string().unwrap()), revenue: match row[76].get_float() { Some(x) => x, None => match row[76].get_int() { @@ -61,7 +61,7 @@ fn main() -> Result<(), Box> { }, quantity: match row[75].get_int() { Some(x) => x, - None => match row[76].get_float() { + None => match row[75].get_float() { Some(x) => x as i64, None => 0, },