add colors

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