adding in color
This commit is contained in:
Generated
+1787
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user