add colors
This commit is contained in:
Generated
+7
@@ -1012,6 +1012,12 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "owo-colors"
|
||||||
|
version = "4.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.12.5"
|
version = "0.12.5"
|
||||||
@@ -1319,6 +1325,7 @@ dependencies = [
|
|||||||
"aria2-ws",
|
"aria2-ws",
|
||||||
"dialoguer",
|
"dialoguer",
|
||||||
"futures",
|
"futures",
|
||||||
|
"owo-colors",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"select",
|
"select",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ edition = "2024"
|
|||||||
aria2-ws = "0.5.1"
|
aria2-ws = "0.5.1"
|
||||||
dialoguer = { version = "0.12.0", features = ["fuzzy-select"] }
|
dialoguer = { version = "0.12.0", features = ["fuzzy-select"] }
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
|
owo-colors = "4.3.0"
|
||||||
reqwest = { version = "0.12", features = ["json"] }
|
reqwest = { version = "0.12", features = ["json"] }
|
||||||
select = "0.6.1"
|
select = "0.6.1"
|
||||||
serde = "1.0.228"
|
serde = "1.0.228"
|
||||||
|
|||||||
+4
-3
@@ -1,6 +1,7 @@
|
|||||||
use aria2_ws::{Callbacks, Client, TaskOptions};
|
use aria2_ws::{Callbacks, Client, TaskOptions};
|
||||||
use dialoguer::FuzzySelect;
|
use dialoguer::FuzzySelect;
|
||||||
use futures::FutureExt;
|
use futures::FutureExt;
|
||||||
|
use owo_colors::OwoColorize;
|
||||||
use select::document::Document;
|
use select::document::Document;
|
||||||
use select::predicate::Name;
|
use select::predicate::Name;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
@@ -27,13 +28,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
/ ( <_> ) | | | \ / / __ \| | \/\ ___/ / Y \/ __ \| | \/ __ \_/ /_/ > ___/| | \/
|
/ ( <_> ) | | | \ / / __ \| | \/\ ___/ / Y \/ __ \| | \/ __ \_/ /_/ > ___/| | \/
|
||||||
/_______ /\____/|__| |__| \/\_/ (____ /__| \___ > \____|__ (____ /___| (____ /\___ / \___ >__|
|
/_______ /\____/|__| |__| \/\_/ (____ /__| \___ > \____|__ (____ /___| (____ /\___ / \___ >__|
|
||||||
\/ \/ \/ \/ \/ \/ \//_____/ \/
|
\/ \/ \/ \/ \/ \/ \//_____/ \/
|
||||||
"#;
|
"#.yellow();
|
||||||
println!("{ascii}");
|
println!("{ascii}");
|
||||||
|
|
||||||
let server_url = "https://api.michijackson.xyz/search?q=".to_owned();
|
let server_url = "https://api.michijackson.xyz/search?q=".to_owned();
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
|
|
||||||
eprint!("Search: ");
|
eprint!("{}", "Search: ".bright_yellow());
|
||||||
io::stdin()
|
io::stdin()
|
||||||
.read_line(&mut input)
|
.read_line(&mut input)
|
||||||
.expect("failed to read input");
|
.expect("failed to read input");
|
||||||
@@ -58,7 +59,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let selection = FuzzySelect::new()
|
let selection = FuzzySelect::new()
|
||||||
.with_prompt("Pick your software")
|
.with_prompt(format!("{}", "Pick your software".bright_yellow()))
|
||||||
.items(&items2)
|
.items(&items2)
|
||||||
.interact()
|
.interact()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user