From 85489e00c5215539d6fabd86d0a30b490fde6b78 Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 09:41:30 +0400 Subject: [PATCH 01/14] ignore ide files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index ad98ac8..9b49981 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ target/ # These are backup files generated by rustfmt **/*.rs.bk + +# IDE +.idea/ From 93ad2f79a01ab5b4096d895e9e7f856adb6cd90c Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 09:41:55 +0400 Subject: [PATCH 02/14] Fix unnecessary clarification --- src/structure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structure.rs b/src/structure.rs index 57777c0..1f2c807 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -225,7 +225,7 @@ impl Config { }; let full_path = self.get_full_path(cf); - std::fs::write(full_path.clone(), data)?; + fs::write(full_path.clone(), data)?; Ok(full_path) } From 625f8bb4d6175d3357325dfaff1515d9f47d9356 Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 09:50:59 +0400 Subject: [PATCH 03/14] Rename method --- src/commands/edit.rs | 4 ++-- src/commands/new.rs | 2 +- src/structure.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/edit.rs b/src/commands/edit.rs index 4012121..988d933 100644 --- a/src/commands/edit.rs +++ b/src/commands/edit.rs @@ -111,7 +111,7 @@ fn edit_selectors(config: &mut Config, resource: &Resource) -> Result<()> { .with_validator(required!("This field is required")) .with_help_message("e.g. title") .prompt()?; - let parsed_type = Select::new("Selector type:", SelectorType::to_vec()).prompt()?; + let parsed_type = Select::new("Selector type:", SelectorType::list_as_vec()).prompt()?; config.resources[resource] .selectors .push(Selector::new(path, name, parsed_type)); @@ -154,7 +154,7 @@ fn edit_selectors(config: &mut Config, resource: &Resource) -> Result<()> { } "Change type" => { config.resources[resource].selectors[&selector].parsed_type = - Select::new("Selector type:", SelectorType::to_vec()).prompt()?; + Select::new("Selector type:", SelectorType::list_as_vec()).prompt()?; break 'selectors_loop; } "Delete" => { diff --git a/src/commands/new.rs b/src/commands/new.rs index 25aa767..178b10b 100644 --- a/src/commands/new.rs +++ b/src/commands/new.rs @@ -84,7 +84,7 @@ fn add_selectors() -> Result> { .with_validator(required!("This field is required")) .with_help_message("e.g. title") .prompt()?; - let parsed_type = Select::new("Selector type:", SelectorType::to_vec()).prompt()?; + let parsed_type = Select::new("Selector type:", SelectorType::list_as_vec()).prompt()?; selectors.push(Selector::new(path, name, parsed_type)); let add_another = Confirm::new("Add another Selector?") diff --git a/src/structure.rs b/src/structure.rs index 1f2c807..9fec740 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -31,7 +31,7 @@ pub enum SelectorType { impl SelectorType { /// It returns a vector of all the possible [ParsedType]s - pub fn to_vec() -> Vec { + pub fn list_as_vec() -> Vec { vec![SelectorType::String, SelectorType::Number] } From bb01d7a8e4d8131c2022c0625e935484eacf3051 Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 09:54:55 +0400 Subject: [PATCH 04/14] Fix annotator issues --- src/commands/new.rs | 2 +- src/scalper.rs | 14 +++++++------- src/structure.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/commands/new.rs b/src/commands/new.rs index 178b10b..4773c6e 100644 --- a/src/commands/new.rs +++ b/src/commands/new.rs @@ -17,7 +17,7 @@ use inquire::{ pub struct Args { /// Name of the config file to create. /// - /// *Optional.* If not provided, the default name will be used. + /// (*Optional*) If not provided, the default name will be used. #[arg(short, long, value_name = "NAME")] name: Option, } diff --git a/src/scalper.rs b/src/scalper.rs index b51b382..49f1cb5 100644 --- a/src/scalper.rs +++ b/src/scalper.rs @@ -17,8 +17,8 @@ pub struct ParsedValue { /// /// Arguments: /// -/// * `selector`: The CSS selector (full path from root) to use to grab the value. -/// * `from`: The URL to fetch the HTML from +/// - `selector`: The CSS selector (full path from root) to use to grab the value. +/// - `from`: The URL to fetch the HTML from /// /// Returns: /// @@ -33,8 +33,8 @@ pub async fn grab_one(selector: &str, from: &str) -> Result { /// /// Arguments: /// -/// * `selectors`: A vector of CSS selectors. -/// * `from`: The URL to fetch the HTML from. +/// - `selectors`: A vector of CSS selectors. +/// - `from`: The URL to fetch the HTML from. /// /// Returns: /// @@ -69,7 +69,7 @@ pub async fn grab( /// /// Arguments: /// -/// * `url`: &str - The URL to fetch the HTML from. +/// - `url`: &str - The URL to fetch the HTML from. /// /// Returns: /// @@ -90,8 +90,8 @@ async fn fetch_html(url: &str) -> Result { /// /// Arguments: /// -/// * `document`: The HTML document we're parsing. -/// * `selector`: The CSS selector (full path from root) to use to find the element. +/// - `document`: The HTML document we're parsing. +/// - `selector`: The CSS selector (full path from root) to use to find the element. /// /// Returns: /// diff --git a/src/structure.rs b/src/structure.rs index 9fec740..673df2f 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -195,8 +195,8 @@ impl Config { /// /// Arguments: /// - /// * `path`: The path to the file to read from. - /// * `cf`: [ConfigFormat] - This is the format of the config file. + /// - `path`: The path to the file to read from. + /// - `cf`: [ConfigFormat] - This is the format of the config file. /// /// Returns: /// @@ -213,7 +213,7 @@ impl Config { /// /// Arguments: /// - /// * `cf`: [ConfigFormat] - This is the format that you want to save the config in. + /// - `cf`: [ConfigFormat] - This is the format that you want to save the config in. /// /// Returns: /// @@ -234,7 +234,7 @@ impl Config { /// /// Arguments: /// - /// * `cf`: [ConfigFormat] - This is the format that you want to save the config in. + /// - `cf`: [ConfigFormat] - This is the format that you want to save the config in. /// /// Returns: /// From c1838652d1f2301bf9f20c769630499fba86456f Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 10:00:23 +0400 Subject: [PATCH 05/14] Fix readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 149a050..09bcea3 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ RVP currently supports Intel Macs, M1 ARM Macs, and Linux. The tool has been tes Unix (MacOs/Linux) manual install - This instruction works for both Linux and MacOS. + This instruction works for both Linux and macOS. Download the latest release from the [releases page](https://github.com/samgozman/rvp/releases) for your platform. For example, if you are using an Intel Mac, download the `rvp-x86_64-apple-darwin.tar.gz` file. For an M1 Mac, download the `rvp-aarch64-apple-darwin.tar.gz` file. @@ -182,7 +182,7 @@ rvp batch --path ./weather.toml --params "israel/tel-aviv" "israel/jerusalem" > `--params` option can be specified for each site in the config file. It simply replaces the `%%` placeholder in the URL. If you have **multiple resources** to parse, you can specify them as a **space-separated list**. -RVP's batch mode allows you to retrieve information from multiple sources and multiple values at once, making it a powerful tool for web scraping and data extraction. +RVP batch mode allows you to retrieve information from multiple sources and multiple values at once, making it a powerful tool for web scraping and data extraction. ## Create config file From f321754f461a83b2f62bbfe3c638a0fb1c9bbc8d Mon Sep 17 00:00:00 2001 From: samgozman Date: Thu, 27 Apr 2023 10:43:08 +0400 Subject: [PATCH 06/14] Add more readable error for number parsing --- src/scalper.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scalper.rs b/src/scalper.rs index 49f1cb5..d3bb250 100644 --- a/src/scalper.rs +++ b/src/scalper.rs @@ -28,6 +28,7 @@ pub async fn grab_one(selector: &str, from: &str) -> Result { let selector = Selector::parse(selector).unwrap(); parse_value(&document, &selector) } + /// It takes a list of selectors and a URL, fetches the HTML from the URL, and then parses the HTML /// using the selectors /// @@ -53,7 +54,10 @@ pub async fn grab( crate::structure::SelectorType::String => Value::String(value), crate::structure::SelectorType::Number => { let number = any_string_to_number(&value); - Value::Number(Number::from_f64(number).expect("failed to parse number")) + Value::Number( + Number::from_f64(number) + .expect(format!("failed to parse number for \"{}\"", &selector.name).as_str()), + ) } }; values.push(ParsedValue { From bcad78f2f0a4fd55bb789356abcc895540335bc9 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 10:17:13 +0400 Subject: [PATCH 07/14] Handle NaN values --- src/scalper.rs | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/scalper.rs b/src/scalper.rs index d3bb250..f3537f3 100644 --- a/src/scalper.rs +++ b/src/scalper.rs @@ -54,10 +54,15 @@ pub async fn grab( crate::structure::SelectorType::String => Value::String(value), crate::structure::SelectorType::Number => { let number = any_string_to_number(&value); - Value::Number( - Number::from_f64(number) - .expect(format!("failed to parse number for \"{}\"", &selector.name).as_str()), - ) + let value: Value; + if number.is_nan() { + value = Value::String("NaN".to_string()); + } else { + value = Value::Number(Number::from_f64(number).expect( + format!("failed to parse number for \"{}\"", &selector.name).as_str(), + )) + } + value } }; values.push(ParsedValue { @@ -217,6 +222,28 @@ mod tests { Ok(()) } + #[tokio::test] + async fn test_grab_with_invalid_selector_type() -> Result<()> { + let selectors = vec![crate::structure::Selector { + name: "title".to_string(), + path: "body > div > h2".to_string(), + parsed_type: crate::structure::SelectorType::Number, + }]; + let grabbed = grab(selectors, "http://example.com".to_string()).await; + if grabbed.is_err() { + panic!("should not fail with invalid selector and return an empty string!"); + } + + let values = grabbed.unwrap(); + assert_eq!(values.len(), 1); + assert_eq!(&values[0].name, "title"); + match &values[0].value { + Value::String(value) => assert_eq!(value, "NaN"), + _ => panic!("value should be a string!"), + } + Ok(()) + } + #[test] fn test_parse_value() -> Result<()> { let document = Html::parse_document("

Example

"); From 7ab01c1e489f13656f594808d8f4131664c54fad Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 10:53:44 +0400 Subject: [PATCH 08/14] Update stock.toml --- examples/stock.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/stock.toml b/examples/stock.toml index 8b3b22c..1c6bc91 100644 --- a/examples/stock.toml +++ b/examples/stock.toml @@ -5,27 +5,27 @@ description = "Gather stock information from different sources" url = "https://finviz.com/quote.ashx?t=%%" [[resources.selectors]] -path = "body > div:nth-child(10) > div > table:nth-child(1) > tbody > tr > td > table.fullview-title > tbody > tr:nth-child(2) > td > a > b" +path = "body > div.content > div.ticker-wrapper tbody > tr > td > table.fullview-title > tbody > tr:nth-child(2) > td > a > b" name = "Name" parsed_type = "String" [[resources.selectors]] -path = "body > div:nth-child(10) > div > table.snapshot-table2 > tbody > tr:nth-child(2) > td:nth-child(2) > b" +path = "div.ticker-wrapper table:nth-child(1) div.snapshot-table-wrapper > table > tbody > tr:nth-child(2) > td:nth-child(2) > b" name = "Market Cap" parsed_type = "String" [[resources.selectors]] -path = "body > div:nth-child(10) > div > table.snapshot-table2 > tbody > tr:nth-child(11) > td:nth-child(12) > b" +path = "div.ticker-wrapper table:nth-child(1) div.snapshot-table-wrapper > table > tbody > tr:nth-child(11) > td:nth-child(12) > b" name = "Price ($)" parsed_type = "Number" [[resources.selectors]] -path = "body > div:nth-child(10) > div > table.snapshot-table2 > tbody > tr:nth-child(7) > td:nth-child(2) > b" +path = "div.ticker-wrapper table:nth-child(1) div.snapshot-table-wrapper > table > tbody > tr:nth-child(7) > td:nth-child(2) > b" name = "Dividend ($)" parsed_type = "Number" [[resources.selectors]] -path = "body > div:nth-child(10) > div > table.snapshot-table2 > tbody > tr:nth-child(1) > td:nth-child(4) > b" +path = "div.ticker-wrapper table:nth-child(1) div.snapshot-table-wrapper > table > tbody > tr:nth-child(1) > td:nth-child(4) > b" name = "P/E" parsed_type = "Number" From e4711093f7e3779e9c135322d26a34ea800078c4 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 20:42:02 +0400 Subject: [PATCH 09/14] fmt --- src/commands/edit.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/edit.rs b/src/commands/edit.rs index 988d933..eae1eba 100644 --- a/src/commands/edit.rs +++ b/src/commands/edit.rs @@ -111,7 +111,8 @@ fn edit_selectors(config: &mut Config, resource: &Resource) -> Result<()> { .with_validator(required!("This field is required")) .with_help_message("e.g. title") .prompt()?; - let parsed_type = Select::new("Selector type:", SelectorType::list_as_vec()).prompt()?; + let parsed_type = + Select::new("Selector type:", SelectorType::list_as_vec()).prompt()?; config.resources[resource] .selectors .push(Selector::new(path, name, parsed_type)); From b70330e92add34e688bea82748be7a64e72f2880 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 20:49:27 +0400 Subject: [PATCH 10/14] Make params number error more readable --- src/commands/batch.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/batch.rs b/src/commands/batch.rs index 6cdb431..6197c9f 100644 --- a/src/commands/batch.rs +++ b/src/commands/batch.rs @@ -76,10 +76,11 @@ pub async fn command(args: Args) -> Result<()> { if args.params.is_some() { let params = args.params.unwrap(); - - if config.resources.len() != params.len() { + let resources_len = config.resources.len(); + if resources_len != params.len() { return Err(anyhow!( - "The number of parameters does not match the number of resources!" + "The number of parameters does not match the number of resources ({})!", + resources_len )); } From eb17895624800b576ef31c77776a2a13f4b6bc16 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 22:25:56 +0400 Subject: [PATCH 11/14] Add 'repeat' option feature --- src/commands/batch.rs | 46 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/src/commands/batch.rs b/src/commands/batch.rs index 6197c9f..dc89a30 100644 --- a/src/commands/batch.rs +++ b/src/commands/batch.rs @@ -1,7 +1,7 @@ use std::{ffi::OsStr, path::PathBuf}; use crate::scalper::{grab, ParsedValue}; -use crate::structure::{Config, ConfigFormat}; +use crate::structure::{Config, ConfigFormat, Resource}; use anyhow::{anyhow, Result}; use clap::{value_parser, Parser}; use comfy_table::modifiers::UTF8_ROUND_CORNERS; @@ -49,6 +49,21 @@ pub struct Args { #[arg(long, conflicts_with = "params")] one_param: Option, + /// (Optional) Used with `--params` to repeat each param for all resources. If you specify 3 + /// params and 2 resources, this 2 resources will be parsed 3 times (for each param). + /// This is useful when you want to parse the same resource with different parameters. + /// (e.g. stock quotes for different companies) + /// + /// This argument is mutually exclusive with `--one-param`. + /// + /// Example: + /// + /// ``` + /// --params param1 param2 -r + /// ``` + #[arg(short, long, conflicts_with = "one_param")] + repeat: bool, + /// Output the data in JSON format #[arg(long)] json: bool, @@ -77,15 +92,38 @@ pub async fn command(args: Args) -> Result<()> { if args.params.is_some() { let params = args.params.unwrap(); let resources_len = config.resources.len(); - if resources_len != params.len() { + if params.len() == 0 { + return Err(anyhow!("You need to specify at least one parameter!")); + } + + if resources_len != params.len() && !args.repeat { return Err(anyhow!( "The number of parameters does not match the number of resources ({})!", resources_len )); } - for (i, param) in params.iter().enumerate() { - config.resources[i].mut_url_with_param(param); + if args.repeat { + // Duplicate resources for each param and the same number of params + let mut duplicated_resources: Vec = Vec::default(); + let mut duplicated_params: Vec = Vec::default(); + for param in params.iter() { + for r in config.resources.iter() { + duplicated_params.push(param.clone()); + duplicated_resources.push(r.clone()); + } + } + config.resources = duplicated_resources; + + // Mutate duplicated resources urls with duplicated params + for (i, param) in duplicated_params.iter().enumerate() { + config.resources[i].mut_url_with_param(param); + } + } else { + // Mutate resource urls with params + for (i, param) in params.iter().enumerate() { + config.resources[i].mut_url_with_param(param); + } } } From fc15f3d3814a6d2c3f64821b87dd5332560e385e Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 22:36:20 +0400 Subject: [PATCH 12/14] Add documentation for option parameter in readme --- README.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 09bcea3..03bdc6a 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,112 @@ rvp batch --path ./weather.toml --params "israel/tel-aviv" "israel/jerusalem" -> `--params` option can be specified for each site in the config file. It simply replaces the `%%` placeholder in the URL. If you have **multiple resources** to parse, you can specify them as a **space-separated list**. +> `--params` option can be specified for each site in the config file. It simply replaces the `%%` placeholder in the URL. +> If you have **multiple resources** to parse, you can specify them as a **space-separated list**. + +#### Example 3: Parse stock information from multiple sources for the multiple stocks at once + +Example config file: [stock.toml](examples/stock.toml) + +```bash +rvp batch -p ./stock.toml --params AAPL MSFT -r --json +``` + +
+ + Output + + ```json + [ + { + "name": "Name", + "value": "Apple Inc." + }, + { + "name": "Market Cap", + "value": "2690.89B" + }, + { + "name": "Price ($)", + "value": 168.29 + }, + { + "name": "Dividend ($)", + "value": 0.92 + }, + { + "name": "P/E", + "value": 28.61 + }, + { + "name": "% of Float Shorted", + "value": 0.73 + }, + { + "name": "Industry", + "value": "Computers/Consumer Electronics" + }, + { + "name": "Sector", + "value": "Technology" + }, + { + "name": "Put/Call Vol Ratio", + "value": 0.85 + }, + { + "name": "Put/Call OI Ratio ", + "value": 1.01 + }, + { + "name": "Name", + "value": "Microsoft Corporation" + }, + { + "name": "Market Cap", + "value": "2271.87B" + }, + { + "name": "Price ($)", + "value": 305.22 + }, + { + "name": "Dividend ($)", + "value": 2.72 + }, + { + "name": "P/E", + "value": 33.89 + }, + { + "name": "% of Float Shorted", + "value": 0.55 + }, + { + "name": "Industry", + "value": "Software" + }, + { + "name": "Sector", + "value": "Technology" + }, + { + "name": "Put/Call Vol Ratio", + "value": 0.82 + }, + { + "name": "Put/Call OI Ratio ", + "value": 1.0 + } + ] + ``` + +
+ +> '-r, --repeat' flag is used to repeat the parameters for each resource. +> The number of parameters you provide will multiply the number of resources. +> So if you have 2 resources (r1, r2) and 2 parameters (p1, p2), you will get 4 results as: +> r1-p1, r2-p1, r1-p2, r2-p2 RVP batch mode allows you to retrieve information from multiple sources and multiple values at once, making it a powerful tool for web scraping and data extraction. From aa5b90bd8d51a312022d7f66b7ec74fa55246572 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 22:39:29 +0400 Subject: [PATCH 13/14] Clippy fixes --- src/commands/batch.rs | 2 +- src/scalper.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/commands/batch.rs b/src/commands/batch.rs index dc89a30..a457da6 100644 --- a/src/commands/batch.rs +++ b/src/commands/batch.rs @@ -92,7 +92,7 @@ pub async fn command(args: Args) -> Result<()> { if args.params.is_some() { let params = args.params.unwrap(); let resources_len = config.resources.len(); - if params.len() == 0 { + if params.is_empty() { return Err(anyhow!("You need to specify at least one parameter!")); } diff --git a/src/scalper.rs b/src/scalper.rs index f3537f3..4a096c8 100644 --- a/src/scalper.rs +++ b/src/scalper.rs @@ -54,14 +54,14 @@ pub async fn grab( crate::structure::SelectorType::String => Value::String(value), crate::structure::SelectorType::Number => { let number = any_string_to_number(&value); - let value: Value; - if number.is_nan() { - value = Value::String("NaN".to_string()); + + let value: Value = if number.is_nan() { + Value::String("NaN".to_string()) } else { - value = Value::Number(Number::from_f64(number).expect( - format!("failed to parse number for \"{}\"", &selector.name).as_str(), - )) - } + Value::Number(Number::from_f64(number).unwrap_or_else(|| { + panic!("failed to parse number for \"{}\"", &selector.name) + })) + }; value } }; From 9c576614fb7156e55c35efb160f8a9af94ff7a14 Mon Sep 17 00:00:00 2001 From: samgozman Date: Fri, 28 Apr 2023 22:42:19 +0400 Subject: [PATCH 14/14] Bump version --- Cargo.lock | 69 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 2 +- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91042af..08ca71b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +checksum = "6342bd4f5a1205d7f41e94a41a901f5647c938cdfa96036338e8533c9d6c2450" dependencies = [ "anstyle", "anstyle-parse", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -98,9 +98,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "byteorder" @@ -128,9 +128,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.2.2" +version = "4.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a" +checksum = "8a1f23fa97e1d1641371b51f35535cb26959b8e27ab50d167a8b996b5bada819" dependencies = [ "clap_builder", "clap_derive", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.2" +version = "4.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6" +checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab" dependencies = [ "anstream", "anstyle", @@ -460,9 +460,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -703,15 +703,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "linux-raw-sys" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "b64f40e5e03e0d54f03845c8197d0291253cdbedfb1cb46b13c2c117554a9f4c" [[package]] name = "lock_api" @@ -839,9 +839,9 @@ checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "openssl" -version = "0.10.50" +version = "0.10.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" +checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" dependencies = [ "bitflags", "cfg-if", @@ -871,9 +871,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.85" +version = "0.9.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" +checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" dependencies = [ "cc", "libc", @@ -1204,9 +1204,9 @@ checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "reqwest" -version = "0.11.16" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" +checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" dependencies = [ "base64", "bytes", @@ -1250,9 +1250,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.11" +version = "0.37.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +checksum = "a0661814f891c57c930a610266415528da53c4933e6dea5fb350cbfe048a9ece" dependencies = [ "bitflags", "errno", @@ -1270,7 +1270,7 @@ checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rvp" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "clap", @@ -1636,9 +1636,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" dependencies = [ "autocfg", "bytes", @@ -1648,14 +1648,14 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", @@ -1674,9 +1674,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -1728,11 +1728,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "cf9cf6a813d3f40c88b0b6b6f29a5c95c6cdbf97c1f9cc53fb820200f5ad814d" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-core", ] diff --git a/Cargo.toml b/Cargo.toml index 8cd6b60..b9296b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rvp" -version = "0.1.2" +version = "0.1.3" edition = "2021" license = "MIT" readme = "README.md"