adding in color

This commit is contained in:
talksik
2023-06-01 16:54:57 -07:00
parent 4286fc6876
commit 9c5264f32b
3 changed files with 1793 additions and 1 deletions
Generated
+1787
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -6,3 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chrono = "0.4.26"
colored = "2.0.0"
reqwest = {version = "0.11", features = ["blocking"]}
scraper = "0.16.0"
+2 -1
View File
@@ -1,6 +1,7 @@
use std::io::Read;
use chrono::prelude::*;
use colored::*;
const TLDR_BASE_URL: &str = "https://tldr.tech/tech";
@@ -51,7 +52,7 @@ fn main() {
let description_element = element.select(&description_selector).next().unwrap();
println!("==================");
println!("{}", title_element.inner_html());
println!("{}", title_element.inner_html().green());
println!("\n");
println!("{}", description_element.inner_html());
println!("\n");