├── .gitignore ├── fonts ├── LiberationSans-Bold.ttf ├── LiberationSans-Italic.ttf ├── LiberationSans-Regular.ttf ├── LiberationSans-BoldItalic.ttf └── SIL Open Font License.txt ├── Cargo.toml ├── README.md ├── src ├── main.rs ├── pdf_sorted_dir.rs ├── target │ └── rust-analyzer │ │ └── metadata │ │ └── sysroot │ │ └── Cargo.lock └── pdf_invoice.rs └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /temp -------------------------------------------------------------------------------- /fonts/LiberationSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phillip-England/finli/main/fonts/LiberationSans-Bold.ttf -------------------------------------------------------------------------------- /fonts/LiberationSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phillip-England/finli/main/fonts/LiberationSans-Italic.ttf -------------------------------------------------------------------------------- /fonts/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phillip-England/finli/main/fonts/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /fonts/LiberationSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phillip-England/finli/main/fonts/LiberationSans-BoldItalic.ttf -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "finli" 3 | version = "0.1.1" 4 | edition = "2021" 5 | description = "A CLI tool for financial reporting and PDF generation" 6 | license = "MIT" 7 | 8 | [dependencies] 9 | clap = { version = "4.5", features = ["derive"] } 10 | rust_decimal = "1.37.2" 11 | walkdir = "2" 12 | genpdf = "0.2" 13 | 14 | [[bin]] 15 | name = "finli" 16 | path = "src/main.rs" 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About 2 | A cli used for sorting .pdf receipts and generating invoices 3 | 4 | ## Installation 5 | ```bash 6 | cargo install finli 7 | ``` 8 | 9 | ## Pdf Naming Conventions 10 | `.pdf` files must be named as follows: 11 | ```bash 12 | [DATE][VENDOR][COST][DESCRIPTION][CATEGORY][LOCATION] 13 | ``` 14 | 15 | Here is a valid name: `010125-target-10.95-pants-uniforms-southroads.pdf` 16 | 17 | ## Invoice Generation 18 | Creates an invoice from a directory full of `.pdf` files: 19 | ```bash 20 | finli generate ./some_dir "INVOICE TITLE" 21 | ``` 22 | 23 | ## Splitting Receipts 24 | Takes a directory full of invoices, scans for 'split' receipts, duplicates them over 'southroads' and 'utica', then sorts each receipt by location into subdirectories. 25 | ```bash 26 | finli sort ./some_dir ./some_destination 27 | ``` -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | 3 | use clap::Parser; 4 | use clap::Subcommand; 5 | 6 | use crate::pdf_invoice::PdfInvoice; 7 | use crate::pdf_sorted_dir::PdfSortedDir; 8 | 9 | mod pdf_invoice; 10 | mod pdf_sorted_dir; 11 | 12 | #[derive(Parser, Debug)] 13 | #[command(name = "", about = "", version = "1.0")] 14 | struct Args { 15 | #[command(subcommand)] 16 | command: Command, 17 | } 18 | 19 | #[derive(Subcommand, Debug)] 20 | enum Command { 21 | Generate { dir: String, invoice_name: String }, 22 | Sort { dir: String, out: String }, 23 | } 24 | 25 | fn run_generate(dir: String, invoice_name: String) -> Option { 26 | let invoice = PdfInvoice::new_from_dir(&dir, &invoice_name); 27 | if invoice.is_err() { 28 | let err = invoice.err().unwrap(); 29 | return Some(err); 30 | } 31 | let invoice = invoice.unwrap(); 32 | let err = invoice.generate(); 33 | if err.is_some() { 34 | let err = err.unwrap(); 35 | return Some(err); 36 | } 37 | return None; 38 | } 39 | 40 | fn run_sort(dir: String, out: String) -> Result<(), String> { 41 | let sorted_dir = PdfSortedDir::new(&dir, &out)?; 42 | return Ok(()); 43 | } 44 | 45 | fn main() { 46 | let args = Args::parse(); 47 | match args.command { 48 | Command::Generate { dir, invoice_name } => { 49 | let err = run_generate(dir, invoice_name); 50 | if err.is_some() { 51 | panic!("{}", err.unwrap()); 52 | } 53 | }, 54 | Command::Sort { dir, out } => { 55 | let err = run_sort(dir, out); 56 | if err.is_err() { 57 | panic!("{:?}", err.unwrap()); 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /fonts/SIL Open Font License.txt: -------------------------------------------------------------------------------- 1 | Digitized data copyright (c) 2010 Google Corporation 2 | with Reserved Font Arimo, Tinos and Cousine. 3 | Copyright (c) 2012 Red Hat, Inc. 4 | with Reserved Font Name Liberation. 5 | 6 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 7 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 8 | 9 | ----------------------------------------------------------- 10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 11 | ----------------------------------------------------------- 12 | 13 | PREAMBLE 14 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 15 | 16 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 17 | 18 | DEFINITIONS 19 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 20 | 21 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s). 22 | 23 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). 24 | 25 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 26 | 27 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 28 | 29 | PERMISSION & CONDITIONS 30 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 31 | 32 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 33 | 34 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 35 | 36 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 37 | 38 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 39 | 40 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 41 | 42 | TERMINATION 43 | This license becomes null and void if any of the above conditions are not met. 44 | 45 | DISCLAIMER 46 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /src/pdf_sorted_dir.rs: -------------------------------------------------------------------------------- 1 | 2 | use std::path::Path; 3 | use std::fs; 4 | 5 | use rust_decimal::Decimal; 6 | 7 | use crate::pdf_invoice::PdfLineItem; 8 | 9 | #[derive(Debug)] 10 | pub struct PdfSortedDir { 11 | dir_root: String, 12 | dir_southroads: String, 13 | dir_utica: String, 14 | } 15 | 16 | impl PdfSortedDir { 17 | 18 | pub fn new(dir: &str, out: &str) -> Result { 19 | 20 | // getting the line items 21 | let line_items = PdfLineItem::new_from_dir(&dir)?; 22 | 23 | // generating out paths to create 24 | let out_path = Path::new(out); 25 | let southroads_out = out_path.join("southroads"); 26 | let southroads_out = &southroads_out.as_path(); 27 | let utica_out = out_path.join("utica"); 28 | let utica_out = &utica_out.as_path(); 29 | let out_dirs: Vec<&Path> = vec![out_path, southroads_out, utica_out]; 30 | 31 | // creating all the out dirs 32 | for inner_dir in out_dirs { 33 | let result = fs::create_dir_all(inner_dir); 34 | if result.is_err() { 35 | println!("{:?}", result.err().unwrap()); 36 | return Err(format!("FAILED TO CREATE DIR: the following dir was not created {}", out)); 37 | } 38 | } 39 | 40 | // getting all of the split line items out 41 | let mut split_line_items: Vec = vec![]; 42 | for item in &line_items { 43 | if item.location.contains("split") { 44 | split_line_items.push(item.clone()); 45 | } 46 | } 47 | 48 | // duplicating our split pdfs 49 | for item in split_line_items { 50 | 51 | // getting the cost in cents and determining if we are even 52 | let cost_in_cents = (item.cost * Decimal::from(100)).round(); 53 | let item_is_even = cost_in_cents % Decimal::from(2) == Decimal::from(0); 54 | 55 | // setting up the cost 56 | let mut utica_cost: Decimal; 57 | let mut southroads_cost: Decimal; 58 | let mut half_cost_in_cents: Decimal; 59 | 60 | // manging even / odd costs 61 | if item_is_even { 62 | half_cost_in_cents = (cost_in_cents) / Decimal::from(2); 63 | southroads_cost = half_cost_in_cents / Decimal::from(100); 64 | utica_cost = half_cost_in_cents / Decimal::from(100); 65 | } else { 66 | half_cost_in_cents = (cost_in_cents - Decimal::from(1)) / Decimal::from(2); 67 | southroads_cost = half_cost_in_cents / Decimal::from(100); 68 | utica_cost = (half_cost_in_cents + Decimal::from(1)) / Decimal::from(100); 69 | } 70 | 71 | // sanity check 72 | if (utica_cost + southroads_cost) != item.cost { 73 | return Err(format!("PDF SPLIT ERROR: when splitting a PdfLineItem, the cost of the two pdfs does not equal the total cost of the original\n{:?}", item)); 74 | } 75 | 76 | // cloning line item into two and updating costs 77 | let mut utica_line_item = item.clone(); 78 | utica_line_item.set_cost(utica_cost); 79 | let err = utica_line_item.set_location("utica.pdf".to_owned()); 80 | if err.is_some() { 81 | return Err(err.unwrap()); 82 | } 83 | let mut southroads_line_item = item.clone().to_owned(); 84 | southroads_line_item.set_cost(southroads_cost); 85 | let err = southroads_line_item.set_location("southroads.pdf".to_owned()); 86 | if err.is_some() { 87 | return Err(err.unwrap()) 88 | } 89 | 90 | // setting up new paths for output files 91 | utica_line_item.set_source_dir(&(out.to_owned() + "/utica")); 92 | southroads_line_item.set_source_dir(&(out.to_owned() + "/southroads")); 93 | 94 | // getting the details for copying/pasting 95 | let source_dest = item.path; 96 | let utica_out = utica_line_item.path; 97 | let southroads_out = southroads_line_item.path; 98 | 99 | // copying the files 100 | let utica_file = fs::copy(source_dest.clone(), utica_out.clone()); 101 | if utica_file.is_err() { 102 | let err = utica_file.err().unwrap(); 103 | println!("{}", err); 104 | return Err(format!("FILE COPY FAILURE: failed to copy {} to {}", source_dest, utica_out)) 105 | } 106 | let southroads_file = fs::copy(source_dest.clone(), southroads_out.clone()); 107 | if southroads_file.is_err() { 108 | let err = southroads_file.err().unwrap(); 109 | println!("{}", err); 110 | return Err(format!("FILE COPY FAILURE: failed to copy {} to {}", source_dest, southroads_out)) 111 | } 112 | 113 | 114 | 115 | 116 | }; 117 | 118 | // sorting our non-split pdfs 119 | for mut item in line_items { 120 | 121 | // skipping split locatons 122 | let location = item.location.clone(); 123 | if location.contains("split") { 124 | continue; 125 | } 126 | 127 | // getting copy/paste destinations 128 | let source_dest = item.path.clone(); 129 | 130 | // copy/pasting for southroads 131 | if location.contains("southroads") { 132 | item.set_source_dir(&(out.to_owned() + "/southroads")); 133 | let file = fs::copy(source_dest.clone(), item.path.clone()); 134 | if file.is_err() { 135 | let err = file.err().unwrap(); 136 | println!("{}", err); 137 | return Err(format!("FILE COPY FAILURE: failed to copy {} to {}", source_dest, item.path)) 138 | } 139 | continue; 140 | } 141 | 142 | // copy/pasting for utica 143 | if location.contains("utica") { 144 | item.set_source_dir(&(out.to_owned() + "/utica")); 145 | let file = fs::copy(source_dest.clone(), item.path.clone()); 146 | if file.is_err() { 147 | let err = file.err().unwrap(); 148 | println!("{}", err); 149 | return Err(format!("FILE COPY FAILURE: failed to copy {} to {}", source_dest, item.path)) 150 | } 151 | } 152 | 153 | } 154 | 155 | 156 | 157 | let sorted_dir = PdfSortedDir { 158 | dir_root: out_path.to_str().unwrap().to_owned(), // cannot fail 159 | dir_southroads: southroads_out.to_str().unwrap().to_owned(), // cannot fail 160 | dir_utica: utica_out.to_str().unwrap().to_owned(), // cannot fail 161 | }; 162 | return Ok(sorted_dir); 163 | } 164 | 165 | } 166 | -------------------------------------------------------------------------------- /src/target/rust-analyzer/metadata/sysroot/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "compiler_builtins", 12 | "gimli", 13 | "rustc-std-workspace-alloc", 14 | "rustc-std-workspace-core", 15 | ] 16 | 17 | [[package]] 18 | name = "adler2" 19 | version = "2.0.0" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 22 | dependencies = [ 23 | "compiler_builtins", 24 | "rustc-std-workspace-core", 25 | ] 26 | 27 | [[package]] 28 | name = "alloc" 29 | version = "0.0.0" 30 | dependencies = [ 31 | "compiler_builtins", 32 | "core", 33 | ] 34 | 35 | [[package]] 36 | name = "allocator-api2" 37 | version = "0.2.21" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 40 | 41 | [[package]] 42 | name = "alloctests" 43 | version = "0.0.0" 44 | dependencies = [ 45 | "rand", 46 | "rand_xorshift", 47 | ] 48 | 49 | [[package]] 50 | name = "cc" 51 | version = "1.2.0" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8" 54 | dependencies = [ 55 | "shlex", 56 | ] 57 | 58 | [[package]] 59 | name = "cfg-if" 60 | version = "1.0.0" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 63 | dependencies = [ 64 | "compiler_builtins", 65 | "rustc-std-workspace-core", 66 | ] 67 | 68 | [[package]] 69 | name = "compiler_builtins" 70 | version = "0.1.152" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "2153cf213eb259361567720ce55f6446f17acd0ccca87fb6dc05360578228a58" 73 | dependencies = [ 74 | "cc", 75 | "rustc-std-workspace-core", 76 | ] 77 | 78 | [[package]] 79 | name = "core" 80 | version = "0.0.0" 81 | 82 | [[package]] 83 | name = "coretests" 84 | version = "0.0.0" 85 | dependencies = [ 86 | "rand", 87 | "rand_xorshift", 88 | ] 89 | 90 | [[package]] 91 | name = "dlmalloc" 92 | version = "0.2.7" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "d9b5e0d321d61de16390ed273b647ce51605b575916d3c25e6ddf27a1e140035" 95 | dependencies = [ 96 | "cfg-if", 97 | "compiler_builtins", 98 | "libc", 99 | "rustc-std-workspace-core", 100 | "windows-sys", 101 | ] 102 | 103 | [[package]] 104 | name = "fortanix-sgx-abi" 105 | version = "0.5.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "57cafc2274c10fab234f176b25903ce17e690fca7597090d50880e047a0389c5" 108 | dependencies = [ 109 | "compiler_builtins", 110 | "rustc-std-workspace-core", 111 | ] 112 | 113 | [[package]] 114 | name = "getopts" 115 | version = "0.2.21" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" 118 | dependencies = [ 119 | "rustc-std-workspace-core", 120 | "rustc-std-workspace-std", 121 | "unicode-width", 122 | ] 123 | 124 | [[package]] 125 | name = "gimli" 126 | version = "0.31.1" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 129 | dependencies = [ 130 | "compiler_builtins", 131 | "rustc-std-workspace-alloc", 132 | "rustc-std-workspace-core", 133 | ] 134 | 135 | [[package]] 136 | name = "hashbrown" 137 | version = "0.15.2" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 140 | dependencies = [ 141 | "allocator-api2", 142 | "compiler_builtins", 143 | "rustc-std-workspace-alloc", 144 | "rustc-std-workspace-core", 145 | ] 146 | 147 | [[package]] 148 | name = "hermit-abi" 149 | version = "0.5.0" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" 152 | dependencies = [ 153 | "compiler_builtins", 154 | "rustc-std-workspace-alloc", 155 | "rustc-std-workspace-core", 156 | ] 157 | 158 | [[package]] 159 | name = "libc" 160 | version = "0.2.171" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 163 | dependencies = [ 164 | "rustc-std-workspace-core", 165 | ] 166 | 167 | [[package]] 168 | name = "memchr" 169 | version = "2.7.4" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 172 | dependencies = [ 173 | "compiler_builtins", 174 | "rustc-std-workspace-core", 175 | ] 176 | 177 | [[package]] 178 | name = "miniz_oxide" 179 | version = "0.8.3" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" 182 | dependencies = [ 183 | "adler2", 184 | "compiler_builtins", 185 | "rustc-std-workspace-alloc", 186 | "rustc-std-workspace-core", 187 | ] 188 | 189 | [[package]] 190 | name = "object" 191 | version = "0.36.7" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 194 | dependencies = [ 195 | "compiler_builtins", 196 | "memchr", 197 | "rustc-std-workspace-alloc", 198 | "rustc-std-workspace-core", 199 | ] 200 | 201 | [[package]] 202 | name = "panic_abort" 203 | version = "0.0.0" 204 | dependencies = [ 205 | "alloc", 206 | "cfg-if", 207 | "compiler_builtins", 208 | "core", 209 | "libc", 210 | ] 211 | 212 | [[package]] 213 | name = "panic_unwind" 214 | version = "0.0.0" 215 | dependencies = [ 216 | "alloc", 217 | "cfg-if", 218 | "compiler_builtins", 219 | "core", 220 | "libc", 221 | "unwind", 222 | ] 223 | 224 | [[package]] 225 | name = "proc-macro2" 226 | version = "1.0.93" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" 229 | dependencies = [ 230 | "unicode-ident", 231 | ] 232 | 233 | [[package]] 234 | name = "proc_macro" 235 | version = "0.0.0" 236 | dependencies = [ 237 | "core", 238 | "std", 239 | ] 240 | 241 | [[package]] 242 | name = "profiler_builtins" 243 | version = "0.0.0" 244 | dependencies = [ 245 | "cc", 246 | ] 247 | 248 | [[package]] 249 | name = "quote" 250 | version = "1.0.38" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" 253 | dependencies = [ 254 | "proc-macro2", 255 | ] 256 | 257 | [[package]] 258 | name = "r-efi" 259 | version = "4.5.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "e9e935efc5854715dfc0a4c9ef18dc69dee0ec3bf9cc3ab740db831c0fdd86a3" 262 | dependencies = [ 263 | "compiler_builtins", 264 | "rustc-std-workspace-core", 265 | ] 266 | 267 | [[package]] 268 | name = "r-efi-alloc" 269 | version = "1.0.0" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "31d6f09fe2b6ad044bc3d2c34ce4979796581afd2f1ebc185837e02421e02fd7" 272 | dependencies = [ 273 | "compiler_builtins", 274 | "r-efi", 275 | "rustc-std-workspace-core", 276 | ] 277 | 278 | [[package]] 279 | name = "rand" 280 | version = "0.9.0" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" 283 | dependencies = [ 284 | "rand_core", 285 | "zerocopy", 286 | ] 287 | 288 | [[package]] 289 | name = "rand_core" 290 | version = "0.9.0" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" 293 | dependencies = [ 294 | "zerocopy", 295 | ] 296 | 297 | [[package]] 298 | name = "rand_xorshift" 299 | version = "0.4.0" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" 302 | dependencies = [ 303 | "rand_core", 304 | ] 305 | 306 | [[package]] 307 | name = "rustc-demangle" 308 | version = "0.1.24" 309 | source = "registry+https://github.com/rust-lang/crates.io-index" 310 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 311 | dependencies = [ 312 | "compiler_builtins", 313 | "rustc-std-workspace-core", 314 | ] 315 | 316 | [[package]] 317 | name = "rustc-std-workspace-alloc" 318 | version = "1.99.0" 319 | dependencies = [ 320 | "alloc", 321 | ] 322 | 323 | [[package]] 324 | name = "rustc-std-workspace-core" 325 | version = "1.99.0" 326 | dependencies = [ 327 | "core", 328 | ] 329 | 330 | [[package]] 331 | name = "rustc-std-workspace-std" 332 | version = "1.99.0" 333 | dependencies = [ 334 | "std", 335 | ] 336 | 337 | [[package]] 338 | name = "shlex" 339 | version = "1.3.0" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 342 | 343 | [[package]] 344 | name = "std" 345 | version = "0.0.0" 346 | dependencies = [ 347 | "addr2line", 348 | "alloc", 349 | "cfg-if", 350 | "compiler_builtins", 351 | "core", 352 | "dlmalloc", 353 | "fortanix-sgx-abi", 354 | "hashbrown", 355 | "hermit-abi", 356 | "libc", 357 | "miniz_oxide", 358 | "object", 359 | "panic_abort", 360 | "panic_unwind", 361 | "r-efi", 362 | "r-efi-alloc", 363 | "rand", 364 | "rand_xorshift", 365 | "rustc-demangle", 366 | "std_detect", 367 | "unwind", 368 | "wasi", 369 | "windows-targets 0.0.0", 370 | ] 371 | 372 | [[package]] 373 | name = "std_detect" 374 | version = "0.1.5" 375 | dependencies = [ 376 | "cfg-if", 377 | "compiler_builtins", 378 | "libc", 379 | "rustc-std-workspace-alloc", 380 | "rustc-std-workspace-core", 381 | ] 382 | 383 | [[package]] 384 | name = "syn" 385 | version = "2.0.98" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" 388 | dependencies = [ 389 | "proc-macro2", 390 | "quote", 391 | "unicode-ident", 392 | ] 393 | 394 | [[package]] 395 | name = "sysroot" 396 | version = "0.0.0" 397 | dependencies = [ 398 | "proc_macro", 399 | "profiler_builtins", 400 | "std", 401 | "test", 402 | ] 403 | 404 | [[package]] 405 | name = "test" 406 | version = "0.0.0" 407 | dependencies = [ 408 | "core", 409 | "getopts", 410 | "libc", 411 | "std", 412 | ] 413 | 414 | [[package]] 415 | name = "unicode-ident" 416 | version = "1.0.16" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" 419 | 420 | [[package]] 421 | name = "unicode-width" 422 | version = "0.1.14" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 425 | dependencies = [ 426 | "compiler_builtins", 427 | "rustc-std-workspace-core", 428 | "rustc-std-workspace-std", 429 | ] 430 | 431 | [[package]] 432 | name = "unwind" 433 | version = "0.0.0" 434 | dependencies = [ 435 | "cfg-if", 436 | "compiler_builtins", 437 | "core", 438 | "libc", 439 | "unwinding", 440 | ] 441 | 442 | [[package]] 443 | name = "unwinding" 444 | version = "0.2.5" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "51f06a05848f650946acef3bf525fe96612226b61f74ae23ffa4e98bfbb8ab3c" 447 | dependencies = [ 448 | "compiler_builtins", 449 | "gimli", 450 | "rustc-std-workspace-core", 451 | ] 452 | 453 | [[package]] 454 | name = "wasi" 455 | version = "0.11.0+wasi-snapshot-preview1" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 458 | dependencies = [ 459 | "compiler_builtins", 460 | "rustc-std-workspace-alloc", 461 | "rustc-std-workspace-core", 462 | ] 463 | 464 | [[package]] 465 | name = "windows-sys" 466 | version = "0.59.0" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 469 | dependencies = [ 470 | "windows-targets 0.52.6", 471 | ] 472 | 473 | [[package]] 474 | name = "windows-targets" 475 | version = "0.0.0" 476 | 477 | [[package]] 478 | name = "windows-targets" 479 | version = "0.52.6" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 482 | dependencies = [ 483 | "windows_aarch64_gnullvm", 484 | "windows_aarch64_msvc", 485 | "windows_i686_gnu", 486 | "windows_i686_gnullvm", 487 | "windows_i686_msvc", 488 | "windows_x86_64_gnu", 489 | "windows_x86_64_gnullvm", 490 | "windows_x86_64_msvc", 491 | ] 492 | 493 | [[package]] 494 | name = "windows_aarch64_gnullvm" 495 | version = "0.52.6" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 498 | 499 | [[package]] 500 | name = "windows_aarch64_msvc" 501 | version = "0.52.6" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 504 | 505 | [[package]] 506 | name = "windows_i686_gnu" 507 | version = "0.52.6" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 510 | 511 | [[package]] 512 | name = "windows_i686_gnullvm" 513 | version = "0.52.6" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 516 | 517 | [[package]] 518 | name = "windows_i686_msvc" 519 | version = "0.52.6" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 522 | 523 | [[package]] 524 | name = "windows_x86_64_gnu" 525 | version = "0.52.6" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 528 | 529 | [[package]] 530 | name = "windows_x86_64_gnullvm" 531 | version = "0.52.6" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 534 | 535 | [[package]] 536 | name = "windows_x86_64_msvc" 537 | version = "0.52.6" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 540 | 541 | [[package]] 542 | name = "zerocopy" 543 | version = "0.8.17" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "aa91407dacce3a68c56de03abe2760159582b846c6a4acd2f456618087f12713" 546 | dependencies = [ 547 | "zerocopy-derive", 548 | ] 549 | 550 | [[package]] 551 | name = "zerocopy-derive" 552 | version = "0.8.17" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "06718a168365cad3d5ff0bb133aad346959a2074bd4a85c121255a11304a8626" 555 | dependencies = [ 556 | "proc-macro2", 557 | "quote", 558 | "syn", 559 | ] 560 | -------------------------------------------------------------------------------- /src/pdf_invoice.rs: -------------------------------------------------------------------------------- 1 | use std::str::FromStr; 2 | use std::path::Path; 3 | 4 | use walkdir::WalkDir; 5 | use rust_decimal::Decimal; 6 | use genpdf::{elements, fonts::{self, FontData, FontFamily}, style, Alignment, Document, Element}; 7 | 8 | 9 | 10 | pub struct PdfInvoice { 11 | pub expense_categories: Vec, 12 | pub total_cost: Decimal, 13 | pub file_name: String, 14 | pub name: String, 15 | } 16 | 17 | impl PdfInvoice { 18 | 19 | pub fn new_from_dir(dir: &str, invoice_name: &str) -> Result { 20 | 21 | // extract the line items 22 | let line_items = PdfLineItem::new_from_dir(&dir); 23 | if line_items.is_err() { 24 | let err = line_items.err().unwrap(); 25 | return Err(err); 26 | } 27 | let line_items = line_items.unwrap(); 28 | 29 | // sort into categories 30 | let expense_categories = PdfExpenseCategory::new_from_line_items(line_items); 31 | 32 | // geting the total 33 | let mut invoice_total = Decimal::from_str("0").unwrap(); // cannot fail 34 | for category in &expense_categories { 35 | invoice_total += category.total_cost; 36 | } 37 | 38 | // creating invoice 39 | let pdf_invoice = PdfInvoice { 40 | name: invoice_name.to_string(), 41 | expense_categories: expense_categories, 42 | total_cost: invoice_total, 43 | file_name: format!("{}.pdf", invoice_name).to_lowercase().replace(" ", "_"), 44 | }; 45 | 46 | return Ok(pdf_invoice); 47 | 48 | } 49 | 50 | pub fn generate(&self) -> Option { 51 | 52 | // loading in our fonts 53 | let regular = include_bytes!("../fonts/LiberationSans-Regular.ttf") as &[u8]; 54 | let bold = include_bytes!("../fonts/LiberationSans-Bold.ttf"); 55 | let italic = include_bytes!("../fonts/LiberationSans-Italic.ttf"); 56 | let bold_italic = include_bytes!("../fonts/LiberationSans-BoldItalic.ttf"); 57 | 58 | let regular_data = genpdf::fonts::FontData::new(regular.to_vec(), None).expect("failed to load in the regular font"); 59 | let bold_data = genpdf::fonts::FontData::new(regular.to_vec(), None).expect("failed to load in the bold font"); 60 | let italic_data = genpdf::fonts::FontData::new(regular.to_vec(), None).expect("failed to load in the italic font"); 61 | let bold_italic_data = genpdf::fonts::FontData::new(regular.to_vec(), None).expect("failed to load in the bold-italic font"); 62 | 63 | 64 | let font_family = FontFamily { 65 | regular: regular_data, 66 | bold: bold_data, 67 | italic: italic_data, 68 | bold_italic: bold_italic_data, 69 | }; 70 | 71 | // prepare the pdf 72 | // let font_family = genpdf::fonts::from_files("./fonts", "LiberationSans", None); 73 | // if font_family.is_err() { 74 | // let err = font_family.err().unwrap(); 75 | // println!("{:?}", err); // third-party error 76 | // return Some(format!("THIRD PARTY FAILURE: failed to load the font family for pdf generation")); 77 | // } 78 | // let font_family = font_family.unwrap(); 79 | let mut doc = Document::new(font_family); 80 | doc.set_title(self.name.clone()); 81 | let mut decorator = genpdf::SimplePageDecorator::new(); 82 | decorator.set_margins(10); 83 | doc.set_page_decorator(decorator); 84 | doc.set_font_size(12); 85 | 86 | // write title header to invoice pdf 87 | let invoice_title = format!("{}: {}", self.name, self.total_cost); 88 | let header = elements::Paragraph::new(invoice_title).aligned(Alignment::Left); 89 | let header = header.clone().styled(style::Style::new().bold().with_font_size(20)); 90 | doc.push(header); 91 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 92 | doc.push(empty_paragraph); 93 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 94 | doc.push(empty_paragraph); 95 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 96 | doc.push(empty_paragraph); 97 | 98 | // writing the categories 99 | for category in &self.expense_categories { 100 | let category_title = format!("{} => {}", category.name, category.total_cost); 101 | let header = elements::Paragraph::new(category_title).aligned(Alignment::Left); 102 | let header = header.clone().styled(style::Style::new().bold().with_font_size(16)); 103 | doc.push(header.clone()); 104 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 105 | let empty_paragraph = empty_paragraph.clone().styled(style::Style::new().with_font_size(4)); 106 | doc.push(empty_paragraph); 107 | for item in &category.line_items { 108 | let item_title = format!("[{}] [{}] [{}] [{}]", item.date, item.description, item.vendor, item.cost); 109 | let item_paragraph = elements::Paragraph::new(item_title).aligned(Alignment::Left); 110 | doc.push(item_paragraph); 111 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 112 | let empty_paragraph = empty_paragraph.clone().styled(style::Style::new().with_font_size(4)); 113 | doc.push(empty_paragraph); 114 | } 115 | let empty_paragraph = elements::Paragraph::new("").aligned(Alignment::Left); 116 | doc.push(empty_paragraph); 117 | } 118 | 119 | // writing output 120 | let output_file = doc.render_to_file(self.file_name.clone()); 121 | if output_file.is_err() { 122 | let err = output_file.err().unwrap(); 123 | println!("{:?}", err); // third-party error 124 | return Some(format!("PDF RENDER FAILURE: failed to render output pdf file: {}", self.file_name)); 125 | } 126 | 127 | return None; 128 | } 129 | 130 | } 131 | 132 | #[derive(Debug)] 133 | pub struct PdfExpenseCategory { 134 | pub name: String, 135 | pub line_items: Vec, 136 | pub total_cost: Decimal, 137 | } 138 | 139 | impl PdfExpenseCategory { 140 | pub fn new_from_line_items(line_items: Vec) -> Vec { 141 | let mut expense_categories: Vec = vec![]; 142 | 143 | // extract each type of category 144 | let mut all_categories: Vec = vec![]; 145 | for item in &line_items { 146 | if all_categories.contains(&item.category) { 147 | continue; 148 | } 149 | all_categories.push(item.category.clone()); 150 | } 151 | 152 | for category in &all_categories { 153 | let mut total = Decimal::from_str("0").unwrap(); // no error possible 154 | let mut matching_line_items: Vec = vec![]; 155 | for item in &line_items { 156 | if *category != item.category { 157 | continue; 158 | } 159 | total = total + item.cost; 160 | matching_line_items.push(item.clone()); 161 | } 162 | let expense_category = PdfExpenseCategory { 163 | name: category.clone(), 164 | line_items: matching_line_items.clone(), 165 | total_cost: total, 166 | }; 167 | expense_categories.push(expense_category); 168 | } 169 | 170 | return expense_categories; 171 | } 172 | 173 | } 174 | 175 | #[derive(Debug)] 176 | pub struct PdfLineItem { 177 | pub source_dir: String, 178 | pub path: String, 179 | pub trimmed_path: String, 180 | pub parts: Vec, 181 | pub date: String, 182 | pub vendor: String, 183 | pub cost: Decimal, 184 | pub description: String, 185 | pub category: String, 186 | pub location: String, 187 | } 188 | 189 | impl Clone for PdfLineItem { 190 | fn clone(&self) -> PdfLineItem { 191 | PdfLineItem { 192 | source_dir: self.source_dir.clone(), 193 | path: self.path.clone(), 194 | trimmed_path: self.trimmed_path.clone(), 195 | parts: self.parts.clone(), 196 | date: self.date.clone(), 197 | vendor: self.vendor.clone(), 198 | cost: self.cost, // Decimal implements Copy, so you can copy it directly 199 | description: self.description.clone(), 200 | category: self.category.clone(), 201 | location: self.location.clone(), 202 | } 203 | } 204 | } 205 | 206 | impl PdfLineItem { 207 | pub fn new(source_dir: &str, path: &str) -> Result { 208 | // ensuring our pdf file has 6 lines 209 | let trimmed_path = &path[(source_dir.len() + 1)..path.len()]; 210 | let parts: Vec = trimmed_path.split("-").map(|s| s.to_string()).collect(); 211 | if parts.len() != 6 { 212 | return Err(format!("INVALID FILE NAME: PdfLineItem must consist of 6 distinct parts but you provided {}\n{}", parts.len(), trimmed_path).to_owned()); 213 | } 214 | 215 | // ensuring we have a valid date 216 | let date_str = parts[0].to_owned(); 217 | let date_num = date_str.parse::(); 218 | if !date_num.is_ok() { 219 | return Err(format!( 220 | "INVALID DATE: PdfLineItem 'date' field should be a valid number\n{}", 221 | trimmed_path 222 | )); 223 | } 224 | if date_str.len() != 6 { 225 | return Err(format!( 226 | "INVALID DATE: PdfLineItem 'date' field should only consist of 6 digits like '010125'\n{}", 227 | trimmed_path, 228 | )); 229 | } 230 | 231 | // extracting vendor 232 | let vendor = parts[1].to_owned(); 233 | 234 | // ensuring we have a cost that is a valid floating-point number 235 | let cost = parts[2].to_owned(); 236 | let cost_as_float = cost.parse::(); 237 | if cost_as_float.is_err() { 238 | return Err(format!( 239 | "INVALID COST: PdfLineItem 'cost' failed to convert to a floating point number\n{}", 240 | trimmed_path 241 | ) 242 | .to_owned()); 243 | } 244 | 245 | // converting the cost (as a String) into a Decimal 246 | let cost_as_decimal = Decimal::from_str(&cost); 247 | if cost_as_decimal.is_err() { 248 | let err = cost_as_decimal.unwrap(); 249 | println!("{:?}", err); // third party library error 250 | return Err(format!("CONVERSION FAILURE: failed to convert the 'cost' field into a Decimal fit for accurate financial math\n{}", trimmed_path)); 251 | } 252 | let cost_as_decimal = cost_as_decimal.unwrap(); 253 | 254 | // extracting the description and category 255 | let description = parts[3].to_owned(); 256 | let category = parts[4].to_owned(); 257 | 258 | // extracting the location and ensuring we have a valid name 259 | let valid_locations = vec!["southroads.pdf", "utica.pdf", "split.pdf"]; 260 | let location = parts[5].to_owned(); 261 | let location = location.to_lowercase(); 262 | if !valid_locations.contains(&location.as_str()) { 263 | return Err(format!("INVALID LOCATION: the 'location' field must be 'southroads', 'utica', or 'split'\n{}", trimmed_path)); 264 | } 265 | 266 | let line_item = PdfLineItem { 267 | source_dir: source_dir.to_owned(), 268 | path: path.to_owned(), 269 | trimmed_path: trimmed_path.to_owned(), 270 | parts: parts, 271 | date: date_str.to_owned(), 272 | vendor: vendor, 273 | cost: cost_as_decimal, 274 | description: description, 275 | category: category, 276 | location: location, 277 | }; 278 | return Ok(line_item); 279 | } 280 | 281 | pub fn new_from_dir(source_dir: &str) -> Result, String> { 282 | // ensure we have a valid source dir 283 | let dir_path = Path::new(&source_dir); 284 | if !dir_path.exists() { 285 | return Err(format!( 286 | "MISSING DIR: this dir does not exist: {:?}", 287 | dir_path 288 | )); 289 | } 290 | if !dir_path.is_dir() { 291 | return Err(format!( 292 | "INVALID DIR: provided a file, not a dir: {:?}", 293 | dir_path 294 | )); 295 | } 296 | 297 | // extract all the file paths within 298 | let mut file_paths: Vec = vec![]; 299 | for entry in WalkDir::new(dir_path) { 300 | if entry.is_err() { 301 | println!("{:?}", entry.err()); // print third party error 302 | return Err( 303 | "WALKDIR FAILURE: an error was encountered when walking the provided dir path" 304 | .to_owned(), 305 | ); 306 | } 307 | let entry = entry.unwrap(); 308 | let path = entry.path(); 309 | let path_str = path.to_str(); 310 | if path_str.is_none() { 311 | return Err("CONVERSION ERROR: failed to convert the filepath to a &str".to_owned()); 312 | } 313 | let path_str = path_str.unwrap().to_owned(); 314 | if path_str == source_dir { 315 | // skip the provided dir 316 | continue; 317 | } 318 | if path.is_dir() { 319 | return Err("INVALID DIR CONTENTS: the provided file path must not contain any subdirectories".to_owned()); 320 | } 321 | let ext = path.extension(); 322 | if ext.is_none() { 323 | return Err( 324 | "INVALID DIR CONTENT: the dir must contain files with valid extensions" 325 | .to_owned(), 326 | ); 327 | } 328 | let ext = ext.unwrap(); 329 | if ext != "pdf" { 330 | return Err( 331 | "INVALID FILE EXTENSION: the dir must contain only .pdf files".to_owned(), 332 | ); 333 | } 334 | file_paths.push(path_str); 335 | } 336 | 337 | // take each file path and create a PdfLineItem for each 338 | let mut line_items: Vec = vec![]; 339 | for path in file_paths { 340 | let line_item = PdfLineItem::new(&source_dir, &path); 341 | if line_item.is_err() { 342 | return Err(line_item.err().unwrap()); 343 | } 344 | let line_item = line_item.unwrap(); 345 | line_items.push(line_item); 346 | } 347 | 348 | return Ok(line_items); 349 | } 350 | 351 | pub fn set_cost(&mut self, new_cost: Decimal) { 352 | let old_cost = self.cost.to_string(); 353 | let original_path = self.path.clone(); 354 | self.cost = new_cost; 355 | self.path = original_path.replace(&format!("-{}-", old_cost), &format!("-{}-", new_cost)); 356 | self.trimmed_path = original_path.replace(&format!("-{}-", old_cost), &format!("-{}-", &new_cost.to_string())); 357 | } 358 | 359 | 360 | pub fn set_location(&mut self, new_location: String) -> Option { 361 | let new_location = new_location.to_lowercase(); 362 | let valid_locations = vec!["southroads.pdf", "utica.pdf", "split.pdf"]; 363 | if !valid_locations.contains(&new_location.as_str()) { 364 | return Some(format!( 365 | "INVALID LOCATION: the 'location' field must be 'southroads', 'utica', or 'split'\n{}", 366 | self.trimmed_path 367 | )); 368 | } 369 | let old_location = self.location.clone(); 370 | let original_path = self.path.clone(); 371 | self.location = new_location.clone(); 372 | self.path = original_path.replace(&format!("-{}", old_location), &format!("-{}", new_location)); 373 | self.trimmed_path = original_path.replace(&format!("-{}", old_location), &format!("-{}", new_location)); 374 | return None 375 | } 376 | 377 | pub fn set_source_dir(&mut self, new_source: &str) { 378 | let old_source = self.source_dir.clone(); 379 | let old_path = self.path.clone(); 380 | self.source_dir = new_source.to_owned(); 381 | self.path = self.source_dir.clone() + &old_path[old_source.len()..old_path.len()].to_owned(); 382 | } 383 | 384 | 385 | } 386 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 10 | 11 | [[package]] 12 | name = "ahash" 13 | version = "0.7.8" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" 16 | dependencies = [ 17 | "getrandom", 18 | "once_cell", 19 | "version_check", 20 | ] 21 | 22 | [[package]] 23 | name = "android-tzdata" 24 | version = "0.1.1" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 27 | 28 | [[package]] 29 | name = "android_system_properties" 30 | version = "0.1.5" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 33 | dependencies = [ 34 | "libc", 35 | ] 36 | 37 | [[package]] 38 | name = "anstream" 39 | version = "0.6.19" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" 42 | dependencies = [ 43 | "anstyle", 44 | "anstyle-parse", 45 | "anstyle-query", 46 | "anstyle-wincon", 47 | "colorchoice", 48 | "is_terminal_polyfill", 49 | "utf8parse", 50 | ] 51 | 52 | [[package]] 53 | name = "anstyle" 54 | version = "1.0.11" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" 57 | 58 | [[package]] 59 | name = "anstyle-parse" 60 | version = "0.2.7" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 63 | dependencies = [ 64 | "utf8parse", 65 | ] 66 | 67 | [[package]] 68 | name = "anstyle-query" 69 | version = "1.1.3" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" 72 | dependencies = [ 73 | "windows-sys", 74 | ] 75 | 76 | [[package]] 77 | name = "anstyle-wincon" 78 | version = "3.0.9" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" 81 | dependencies = [ 82 | "anstyle", 83 | "once_cell_polyfill", 84 | "windows-sys", 85 | ] 86 | 87 | [[package]] 88 | name = "approx" 89 | version = "0.3.2" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" 92 | dependencies = [ 93 | "num-traits", 94 | ] 95 | 96 | [[package]] 97 | name = "arrayvec" 98 | version = "0.7.6" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 101 | 102 | [[package]] 103 | name = "autocfg" 104 | version = "1.5.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 107 | 108 | [[package]] 109 | name = "base-x" 110 | version = "0.2.11" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 113 | 114 | [[package]] 115 | name = "bitvec" 116 | version = "1.0.1" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 119 | dependencies = [ 120 | "funty", 121 | "radium", 122 | "tap", 123 | "wyz", 124 | ] 125 | 126 | [[package]] 127 | name = "borsh" 128 | version = "1.5.7" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" 131 | dependencies = [ 132 | "borsh-derive", 133 | "cfg_aliases", 134 | ] 135 | 136 | [[package]] 137 | name = "borsh-derive" 138 | version = "1.5.7" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" 141 | dependencies = [ 142 | "once_cell", 143 | "proc-macro-crate", 144 | "proc-macro2", 145 | "quote", 146 | "syn 2.0.104", 147 | ] 148 | 149 | [[package]] 150 | name = "bstr" 151 | version = "1.12.0" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" 154 | dependencies = [ 155 | "memchr", 156 | "regex-automata", 157 | "serde", 158 | ] 159 | 160 | [[package]] 161 | name = "bumpalo" 162 | version = "3.18.1" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" 165 | 166 | [[package]] 167 | name = "bytecheck" 168 | version = "0.6.12" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" 171 | dependencies = [ 172 | "bytecheck_derive", 173 | "ptr_meta", 174 | "simdutf8", 175 | ] 176 | 177 | [[package]] 178 | name = "bytecheck_derive" 179 | version = "0.6.12" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" 182 | dependencies = [ 183 | "proc-macro2", 184 | "quote", 185 | "syn 1.0.109", 186 | ] 187 | 188 | [[package]] 189 | name = "byteorder" 190 | version = "1.5.0" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 193 | 194 | [[package]] 195 | name = "bytes" 196 | version = "1.10.1" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 199 | 200 | [[package]] 201 | name = "cc" 202 | version = "1.2.27" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" 205 | dependencies = [ 206 | "shlex", 207 | ] 208 | 209 | [[package]] 210 | name = "cfg-if" 211 | version = "1.0.1" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" 214 | 215 | [[package]] 216 | name = "cfg_aliases" 217 | version = "0.2.1" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 220 | 221 | [[package]] 222 | name = "chrono" 223 | version = "0.4.41" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" 226 | dependencies = [ 227 | "android-tzdata", 228 | "iana-time-zone", 229 | "js-sys", 230 | "num-traits", 231 | "wasm-bindgen", 232 | "windows-link", 233 | ] 234 | 235 | [[package]] 236 | name = "clap" 237 | version = "4.5.40" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f" 240 | dependencies = [ 241 | "clap_builder", 242 | "clap_derive", 243 | ] 244 | 245 | [[package]] 246 | name = "clap_builder" 247 | version = "4.5.40" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e" 250 | dependencies = [ 251 | "anstream", 252 | "anstyle", 253 | "clap_lex", 254 | "strsim", 255 | ] 256 | 257 | [[package]] 258 | name = "clap_derive" 259 | version = "4.5.40" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce" 262 | dependencies = [ 263 | "heck", 264 | "proc-macro2", 265 | "quote", 266 | "syn 2.0.104", 267 | ] 268 | 269 | [[package]] 270 | name = "clap_lex" 271 | version = "0.7.5" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" 274 | 275 | [[package]] 276 | name = "colorchoice" 277 | version = "1.0.4" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 280 | 281 | [[package]] 282 | name = "const_fn" 283 | version = "0.4.11" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" 286 | 287 | [[package]] 288 | name = "core-foundation-sys" 289 | version = "0.8.7" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 292 | 293 | [[package]] 294 | name = "crc32fast" 295 | version = "1.4.2" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 298 | dependencies = [ 299 | "cfg-if", 300 | ] 301 | 302 | [[package]] 303 | name = "derive_more" 304 | version = "0.99.20" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" 307 | dependencies = [ 308 | "proc-macro2", 309 | "quote", 310 | "syn 2.0.104", 311 | ] 312 | 313 | [[package]] 314 | name = "discard" 315 | version = "1.0.4" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 318 | 319 | [[package]] 320 | name = "dtoa" 321 | version = "0.4.8" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" 324 | 325 | [[package]] 326 | name = "encoding" 327 | version = "0.2.33" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 330 | dependencies = [ 331 | "encoding-index-japanese", 332 | "encoding-index-korean", 333 | "encoding-index-simpchinese", 334 | "encoding-index-singlebyte", 335 | "encoding-index-tradchinese", 336 | ] 337 | 338 | [[package]] 339 | name = "encoding-index-japanese" 340 | version = "1.20141219.5" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 343 | dependencies = [ 344 | "encoding_index_tests", 345 | ] 346 | 347 | [[package]] 348 | name = "encoding-index-korean" 349 | version = "1.20141219.5" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 352 | dependencies = [ 353 | "encoding_index_tests", 354 | ] 355 | 356 | [[package]] 357 | name = "encoding-index-simpchinese" 358 | version = "1.20141219.5" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 361 | dependencies = [ 362 | "encoding_index_tests", 363 | ] 364 | 365 | [[package]] 366 | name = "encoding-index-singlebyte" 367 | version = "1.20141219.5" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 370 | dependencies = [ 371 | "encoding_index_tests", 372 | ] 373 | 374 | [[package]] 375 | name = "encoding-index-tradchinese" 376 | version = "1.20141219.5" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 379 | dependencies = [ 380 | "encoding_index_tests", 381 | ] 382 | 383 | [[package]] 384 | name = "encoding_index_tests" 385 | version = "0.1.4" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 388 | 389 | [[package]] 390 | name = "equivalent" 391 | version = "1.0.2" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 394 | 395 | [[package]] 396 | name = "finli" 397 | version = "0.1.1" 398 | dependencies = [ 399 | "clap", 400 | "genpdf", 401 | "rust_decimal", 402 | "walkdir", 403 | ] 404 | 405 | [[package]] 406 | name = "flate2" 407 | version = "1.1.2" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" 410 | dependencies = [ 411 | "crc32fast", 412 | "miniz_oxide", 413 | ] 414 | 415 | [[package]] 416 | name = "funty" 417 | version = "2.0.0" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 420 | 421 | [[package]] 422 | name = "genpdf" 423 | version = "0.2.0" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "a1c422344482708cb32db843cf3f55f27918cd24fec7b505bde895a1e8702c34" 426 | dependencies = [ 427 | "derive_more", 428 | "lopdf", 429 | "printpdf", 430 | "rusttype", 431 | ] 432 | 433 | [[package]] 434 | name = "getrandom" 435 | version = "0.2.16" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 438 | dependencies = [ 439 | "cfg-if", 440 | "libc", 441 | "wasi", 442 | ] 443 | 444 | [[package]] 445 | name = "hashbrown" 446 | version = "0.12.3" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 449 | dependencies = [ 450 | "ahash", 451 | ] 452 | 453 | [[package]] 454 | name = "hashbrown" 455 | version = "0.15.4" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" 458 | 459 | [[package]] 460 | name = "heck" 461 | version = "0.5.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 464 | 465 | [[package]] 466 | name = "iana-time-zone" 467 | version = "0.1.63" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 470 | dependencies = [ 471 | "android_system_properties", 472 | "core-foundation-sys", 473 | "iana-time-zone-haiku", 474 | "js-sys", 475 | "log", 476 | "wasm-bindgen", 477 | "windows-core", 478 | ] 479 | 480 | [[package]] 481 | name = "iana-time-zone-haiku" 482 | version = "0.1.2" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 485 | dependencies = [ 486 | "cc", 487 | ] 488 | 489 | [[package]] 490 | name = "indexmap" 491 | version = "2.9.0" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 494 | dependencies = [ 495 | "equivalent", 496 | "hashbrown 0.15.4", 497 | ] 498 | 499 | [[package]] 500 | name = "is_terminal_polyfill" 501 | version = "1.70.1" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 504 | 505 | [[package]] 506 | name = "itoa" 507 | version = "0.4.8" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 510 | 511 | [[package]] 512 | name = "itoa" 513 | version = "1.0.15" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 516 | 517 | [[package]] 518 | name = "js-sys" 519 | version = "0.3.77" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 522 | dependencies = [ 523 | "once_cell", 524 | "wasm-bindgen", 525 | ] 526 | 527 | [[package]] 528 | name = "libc" 529 | version = "0.2.174" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" 532 | 533 | [[package]] 534 | name = "linked-hash-map" 535 | version = "0.5.6" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 538 | 539 | [[package]] 540 | name = "log" 541 | version = "0.4.27" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 544 | 545 | [[package]] 546 | name = "lopdf" 547 | version = "0.26.0" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "b49a0272112719d0037ab63d4bb67f73ba659e1e90bc38f235f163a457ac16f3" 550 | dependencies = [ 551 | "chrono", 552 | "dtoa", 553 | "encoding", 554 | "flate2", 555 | "itoa 0.4.8", 556 | "linked-hash-map", 557 | "log", 558 | "lzw", 559 | "pom", 560 | "time", 561 | ] 562 | 563 | [[package]] 564 | name = "lzw" 565 | version = "0.10.0" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 568 | 569 | [[package]] 570 | name = "memchr" 571 | version = "2.7.5" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 574 | 575 | [[package]] 576 | name = "miniz_oxide" 577 | version = "0.8.9" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 580 | dependencies = [ 581 | "adler2", 582 | ] 583 | 584 | [[package]] 585 | name = "num-traits" 586 | version = "0.2.19" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 589 | dependencies = [ 590 | "autocfg", 591 | ] 592 | 593 | [[package]] 594 | name = "once_cell" 595 | version = "1.21.3" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 598 | 599 | [[package]] 600 | name = "once_cell_polyfill" 601 | version = "1.70.1" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" 604 | 605 | [[package]] 606 | name = "ordered-float" 607 | version = "1.1.1" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" 610 | dependencies = [ 611 | "num-traits", 612 | ] 613 | 614 | [[package]] 615 | name = "pom" 616 | version = "3.4.0" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "6c972d8f86e943ad532d0b04e8965a749ad1d18bb981a9c7b3ae72fe7fd7744b" 619 | dependencies = [ 620 | "bstr", 621 | ] 622 | 623 | [[package]] 624 | name = "ppv-lite86" 625 | version = "0.2.21" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 628 | dependencies = [ 629 | "zerocopy", 630 | ] 631 | 632 | [[package]] 633 | name = "printpdf" 634 | version = "0.3.4" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "1a2472a184bcb128d0e3db65b59ebd11d010259a5e14fd9d048cba8f2c9302d4" 637 | dependencies = [ 638 | "js-sys", 639 | "lopdf", 640 | "rusttype", 641 | "time", 642 | ] 643 | 644 | [[package]] 645 | name = "proc-macro-crate" 646 | version = "3.3.0" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" 649 | dependencies = [ 650 | "toml_edit", 651 | ] 652 | 653 | [[package]] 654 | name = "proc-macro-hack" 655 | version = "0.5.20+deprecated" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 658 | 659 | [[package]] 660 | name = "proc-macro2" 661 | version = "1.0.95" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 664 | dependencies = [ 665 | "unicode-ident", 666 | ] 667 | 668 | [[package]] 669 | name = "ptr_meta" 670 | version = "0.1.4" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" 673 | dependencies = [ 674 | "ptr_meta_derive", 675 | ] 676 | 677 | [[package]] 678 | name = "ptr_meta_derive" 679 | version = "0.1.4" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" 682 | dependencies = [ 683 | "proc-macro2", 684 | "quote", 685 | "syn 1.0.109", 686 | ] 687 | 688 | [[package]] 689 | name = "quote" 690 | version = "1.0.40" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 693 | dependencies = [ 694 | "proc-macro2", 695 | ] 696 | 697 | [[package]] 698 | name = "radium" 699 | version = "0.7.0" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 702 | 703 | [[package]] 704 | name = "rand" 705 | version = "0.8.5" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 708 | dependencies = [ 709 | "libc", 710 | "rand_chacha", 711 | "rand_core", 712 | ] 713 | 714 | [[package]] 715 | name = "rand_chacha" 716 | version = "0.3.1" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 719 | dependencies = [ 720 | "ppv-lite86", 721 | "rand_core", 722 | ] 723 | 724 | [[package]] 725 | name = "rand_core" 726 | version = "0.6.4" 727 | source = "registry+https://github.com/rust-lang/crates.io-index" 728 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 729 | dependencies = [ 730 | "getrandom", 731 | ] 732 | 733 | [[package]] 734 | name = "regex-automata" 735 | version = "0.4.9" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 738 | 739 | [[package]] 740 | name = "rend" 741 | version = "0.4.2" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" 744 | dependencies = [ 745 | "bytecheck", 746 | ] 747 | 748 | [[package]] 749 | name = "rkyv" 750 | version = "0.7.45" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" 753 | dependencies = [ 754 | "bitvec", 755 | "bytecheck", 756 | "bytes", 757 | "hashbrown 0.12.3", 758 | "ptr_meta", 759 | "rend", 760 | "rkyv_derive", 761 | "seahash", 762 | "tinyvec", 763 | "uuid", 764 | ] 765 | 766 | [[package]] 767 | name = "rkyv_derive" 768 | version = "0.7.45" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" 771 | dependencies = [ 772 | "proc-macro2", 773 | "quote", 774 | "syn 1.0.109", 775 | ] 776 | 777 | [[package]] 778 | name = "rust_decimal" 779 | version = "1.37.2" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "b203a6425500a03e0919c42d3c47caca51e79f1132046626d2c8871c5092035d" 782 | dependencies = [ 783 | "arrayvec", 784 | "borsh", 785 | "bytes", 786 | "num-traits", 787 | "rand", 788 | "rkyv", 789 | "serde", 790 | "serde_json", 791 | ] 792 | 793 | [[package]] 794 | name = "rustc_version" 795 | version = "0.2.3" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 798 | dependencies = [ 799 | "semver", 800 | ] 801 | 802 | [[package]] 803 | name = "rusttype" 804 | version = "0.8.3" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" 807 | dependencies = [ 808 | "approx", 809 | "ordered-float", 810 | "stb_truetype", 811 | ] 812 | 813 | [[package]] 814 | name = "rustversion" 815 | version = "1.0.21" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" 818 | 819 | [[package]] 820 | name = "ryu" 821 | version = "1.0.20" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 824 | 825 | [[package]] 826 | name = "same-file" 827 | version = "1.0.6" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 830 | dependencies = [ 831 | "winapi-util", 832 | ] 833 | 834 | [[package]] 835 | name = "seahash" 836 | version = "4.1.0" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" 839 | 840 | [[package]] 841 | name = "semver" 842 | version = "0.9.0" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 845 | dependencies = [ 846 | "semver-parser", 847 | ] 848 | 849 | [[package]] 850 | name = "semver-parser" 851 | version = "0.7.0" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 854 | 855 | [[package]] 856 | name = "serde" 857 | version = "1.0.219" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 860 | dependencies = [ 861 | "serde_derive", 862 | ] 863 | 864 | [[package]] 865 | name = "serde_derive" 866 | version = "1.0.219" 867 | source = "registry+https://github.com/rust-lang/crates.io-index" 868 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 869 | dependencies = [ 870 | "proc-macro2", 871 | "quote", 872 | "syn 2.0.104", 873 | ] 874 | 875 | [[package]] 876 | name = "serde_json" 877 | version = "1.0.140" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 880 | dependencies = [ 881 | "itoa 1.0.15", 882 | "memchr", 883 | "ryu", 884 | "serde", 885 | ] 886 | 887 | [[package]] 888 | name = "sha1" 889 | version = "0.6.1" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 892 | dependencies = [ 893 | "sha1_smol", 894 | ] 895 | 896 | [[package]] 897 | name = "sha1_smol" 898 | version = "1.0.1" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 901 | 902 | [[package]] 903 | name = "shlex" 904 | version = "1.3.0" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 907 | 908 | [[package]] 909 | name = "simdutf8" 910 | version = "0.1.5" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" 913 | 914 | [[package]] 915 | name = "standback" 916 | version = "0.2.17" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 919 | dependencies = [ 920 | "version_check", 921 | ] 922 | 923 | [[package]] 924 | name = "stb_truetype" 925 | version = "0.3.1" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" 928 | dependencies = [ 929 | "byteorder", 930 | ] 931 | 932 | [[package]] 933 | name = "stdweb" 934 | version = "0.4.20" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 937 | dependencies = [ 938 | "discard", 939 | "rustc_version", 940 | "stdweb-derive", 941 | "stdweb-internal-macros", 942 | "stdweb-internal-runtime", 943 | "wasm-bindgen", 944 | ] 945 | 946 | [[package]] 947 | name = "stdweb-derive" 948 | version = "0.5.3" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 951 | dependencies = [ 952 | "proc-macro2", 953 | "quote", 954 | "serde", 955 | "serde_derive", 956 | "syn 1.0.109", 957 | ] 958 | 959 | [[package]] 960 | name = "stdweb-internal-macros" 961 | version = "0.2.9" 962 | source = "registry+https://github.com/rust-lang/crates.io-index" 963 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 964 | dependencies = [ 965 | "base-x", 966 | "proc-macro2", 967 | "quote", 968 | "serde", 969 | "serde_derive", 970 | "serde_json", 971 | "sha1", 972 | "syn 1.0.109", 973 | ] 974 | 975 | [[package]] 976 | name = "stdweb-internal-runtime" 977 | version = "0.1.5" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 980 | 981 | [[package]] 982 | name = "strsim" 983 | version = "0.11.1" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 986 | 987 | [[package]] 988 | name = "syn" 989 | version = "1.0.109" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 992 | dependencies = [ 993 | "proc-macro2", 994 | "quote", 995 | "unicode-ident", 996 | ] 997 | 998 | [[package]] 999 | name = "syn" 1000 | version = "2.0.104" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" 1003 | dependencies = [ 1004 | "proc-macro2", 1005 | "quote", 1006 | "unicode-ident", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "tap" 1011 | version = "1.0.1" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 1014 | 1015 | [[package]] 1016 | name = "time" 1017 | version = "0.2.27" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 1020 | dependencies = [ 1021 | "const_fn", 1022 | "libc", 1023 | "standback", 1024 | "stdweb", 1025 | "time-macros", 1026 | "version_check", 1027 | "winapi", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "time-macros" 1032 | version = "0.1.1" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 1035 | dependencies = [ 1036 | "proc-macro-hack", 1037 | "time-macros-impl", 1038 | ] 1039 | 1040 | [[package]] 1041 | name = "time-macros-impl" 1042 | version = "0.1.2" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 1045 | dependencies = [ 1046 | "proc-macro-hack", 1047 | "proc-macro2", 1048 | "quote", 1049 | "standback", 1050 | "syn 1.0.109", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "tinyvec" 1055 | version = "1.9.0" 1056 | source = "registry+https://github.com/rust-lang/crates.io-index" 1057 | checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" 1058 | dependencies = [ 1059 | "tinyvec_macros", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "tinyvec_macros" 1064 | version = "0.1.1" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1067 | 1068 | [[package]] 1069 | name = "toml_datetime" 1070 | version = "0.6.11" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" 1073 | 1074 | [[package]] 1075 | name = "toml_edit" 1076 | version = "0.22.27" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" 1079 | dependencies = [ 1080 | "indexmap", 1081 | "toml_datetime", 1082 | "winnow", 1083 | ] 1084 | 1085 | [[package]] 1086 | name = "unicode-ident" 1087 | version = "1.0.18" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1090 | 1091 | [[package]] 1092 | name = "utf8parse" 1093 | version = "0.2.2" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1096 | 1097 | [[package]] 1098 | name = "uuid" 1099 | version = "1.17.0" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" 1102 | dependencies = [ 1103 | "js-sys", 1104 | "wasm-bindgen", 1105 | ] 1106 | 1107 | [[package]] 1108 | name = "version_check" 1109 | version = "0.9.5" 1110 | source = "registry+https://github.com/rust-lang/crates.io-index" 1111 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1112 | 1113 | [[package]] 1114 | name = "walkdir" 1115 | version = "2.5.0" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 1118 | dependencies = [ 1119 | "same-file", 1120 | "winapi-util", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "wasi" 1125 | version = "0.11.1+wasi-snapshot-preview1" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 1128 | 1129 | [[package]] 1130 | name = "wasm-bindgen" 1131 | version = "0.2.100" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 1134 | dependencies = [ 1135 | "cfg-if", 1136 | "once_cell", 1137 | "rustversion", 1138 | "wasm-bindgen-macro", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "wasm-bindgen-backend" 1143 | version = "0.2.100" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 1146 | dependencies = [ 1147 | "bumpalo", 1148 | "log", 1149 | "proc-macro2", 1150 | "quote", 1151 | "syn 2.0.104", 1152 | "wasm-bindgen-shared", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "wasm-bindgen-macro" 1157 | version = "0.2.100" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 1160 | dependencies = [ 1161 | "quote", 1162 | "wasm-bindgen-macro-support", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "wasm-bindgen-macro-support" 1167 | version = "0.2.100" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 1170 | dependencies = [ 1171 | "proc-macro2", 1172 | "quote", 1173 | "syn 2.0.104", 1174 | "wasm-bindgen-backend", 1175 | "wasm-bindgen-shared", 1176 | ] 1177 | 1178 | [[package]] 1179 | name = "wasm-bindgen-shared" 1180 | version = "0.2.100" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 1183 | dependencies = [ 1184 | "unicode-ident", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "winapi" 1189 | version = "0.3.9" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1192 | dependencies = [ 1193 | "winapi-i686-pc-windows-gnu", 1194 | "winapi-x86_64-pc-windows-gnu", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "winapi-i686-pc-windows-gnu" 1199 | version = "0.4.0" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1202 | 1203 | [[package]] 1204 | name = "winapi-util" 1205 | version = "0.1.9" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 1208 | dependencies = [ 1209 | "windows-sys", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "winapi-x86_64-pc-windows-gnu" 1214 | version = "0.4.0" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1217 | 1218 | [[package]] 1219 | name = "windows-core" 1220 | version = "0.61.2" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 1223 | dependencies = [ 1224 | "windows-implement", 1225 | "windows-interface", 1226 | "windows-link", 1227 | "windows-result", 1228 | "windows-strings", 1229 | ] 1230 | 1231 | [[package]] 1232 | name = "windows-implement" 1233 | version = "0.60.0" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 1236 | dependencies = [ 1237 | "proc-macro2", 1238 | "quote", 1239 | "syn 2.0.104", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "windows-interface" 1244 | version = "0.59.1" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 1247 | dependencies = [ 1248 | "proc-macro2", 1249 | "quote", 1250 | "syn 2.0.104", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "windows-link" 1255 | version = "0.1.3" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 1258 | 1259 | [[package]] 1260 | name = "windows-result" 1261 | version = "0.3.4" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 1264 | dependencies = [ 1265 | "windows-link", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "windows-strings" 1270 | version = "0.4.2" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 1273 | dependencies = [ 1274 | "windows-link", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "windows-sys" 1279 | version = "0.59.0" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1282 | dependencies = [ 1283 | "windows-targets", 1284 | ] 1285 | 1286 | [[package]] 1287 | name = "windows-targets" 1288 | version = "0.52.6" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1291 | dependencies = [ 1292 | "windows_aarch64_gnullvm", 1293 | "windows_aarch64_msvc", 1294 | "windows_i686_gnu", 1295 | "windows_i686_gnullvm", 1296 | "windows_i686_msvc", 1297 | "windows_x86_64_gnu", 1298 | "windows_x86_64_gnullvm", 1299 | "windows_x86_64_msvc", 1300 | ] 1301 | 1302 | [[package]] 1303 | name = "windows_aarch64_gnullvm" 1304 | version = "0.52.6" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1307 | 1308 | [[package]] 1309 | name = "windows_aarch64_msvc" 1310 | version = "0.52.6" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1313 | 1314 | [[package]] 1315 | name = "windows_i686_gnu" 1316 | version = "0.52.6" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1319 | 1320 | [[package]] 1321 | name = "windows_i686_gnullvm" 1322 | version = "0.52.6" 1323 | source = "registry+https://github.com/rust-lang/crates.io-index" 1324 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1325 | 1326 | [[package]] 1327 | name = "windows_i686_msvc" 1328 | version = "0.52.6" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1331 | 1332 | [[package]] 1333 | name = "windows_x86_64_gnu" 1334 | version = "0.52.6" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1337 | 1338 | [[package]] 1339 | name = "windows_x86_64_gnullvm" 1340 | version = "0.52.6" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1343 | 1344 | [[package]] 1345 | name = "windows_x86_64_msvc" 1346 | version = "0.52.6" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1349 | 1350 | [[package]] 1351 | name = "winnow" 1352 | version = "0.7.11" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" 1355 | dependencies = [ 1356 | "memchr", 1357 | ] 1358 | 1359 | [[package]] 1360 | name = "wyz" 1361 | version = "0.5.1" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 1364 | dependencies = [ 1365 | "tap", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "zerocopy" 1370 | version = "0.8.26" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" 1373 | dependencies = [ 1374 | "zerocopy-derive", 1375 | ] 1376 | 1377 | [[package]] 1378 | name = "zerocopy-derive" 1379 | version = "0.8.26" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" 1382 | dependencies = [ 1383 | "proc-macro2", 1384 | "quote", 1385 | "syn 2.0.104", 1386 | ] 1387 | --------------------------------------------------------------------------------