remove terminal-link dependency

This commit is contained in:
Troy 2025-01-14 19:16:17 +00:00
parent cb4d395997
commit dfff01acf6
Signed by: troy
GPG key ID: DFC06C02ED3B4711
3 changed files with 4 additions and 12 deletions

7
Cargo.lock generated
View file

@ -1034,7 +1034,6 @@ dependencies = [
"reqwest",
"rss",
"serde",
"terminal-link",
"tokio",
"toml",
"xdg",
@ -1439,12 +1438,6 @@ dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "terminal-link"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "253bcead4f3aa96243b0f8fa46f9010e87ca23bd5d0c723d474ff1d2417bbdf8"
[[package]]
name = "tinystr"
version = "0.7.6"

View file

@ -16,7 +16,6 @@ toml = "0.8.19"
xdg = "2.5.2"
futures = "0.3.31"
indicatif = "0.17.9"
terminal-link = "0.1.0"
[profile.dev]
opt-level = 0

View file

@ -1,6 +1,5 @@
use indicatif::ProgressStyle;
use std::error::Error;
use terminal_link::Link;
use tokio;
mod config;
@ -20,14 +19,15 @@ async fn main() -> Result<(), Box<dyn Error>> {
.try_into()
.expect("Could not convert list length"),
);
pb.set_style(ProgressStyle::with_template("{wide_bar} {percent} {msg}").unwrap());
pb.set_style(ProgressStyle::with_template("{wide_bar} {percent}% {msg}").unwrap());
let all_items = data::run_tasks(values.to_vec(), count, skip_amount, &pb).await;
pb.finish_and_clear();
for item in all_items {
println!(
"\x1b[1m>\x1b[0m \x1b[1;32m{}\x1b[0m\n\x1b[3m\x1b[2m{}\x1b[0m\n\x1b[2m{}\x1b[0m\n",
Link::new(&item.title, &item.link),
"\x1b[1m>\x1b[0m \x1b[1;32m\x1b]8;;{}\x1b\\{}\x1b]8;;\x1b\\\x1b[0m\n\x1b[3m\x1b[2m{}\x1b[0m\n\x1b[2m{}\x1b[0m\n",
item.link,
item.title,
utils::trim_chars(&item.description),
item.pub_date.to_string()
);