From dfff01acf61f89bdb195f05384b2e97926d5b2e8 Mon Sep 17 00:00:00 2001 From: Troy Date: Tue, 14 Jan 2025 19:16:17 +0000 Subject: [PATCH] remove terminal-link dependency --- Cargo.lock | 7 ------- Cargo.toml | 1 - src/main.rs | 8 ++++---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 738ca0c..3c578bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" diff --git a/Cargo.toml b/Cargo.toml index 437d5c1..3dd1f54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/src/main.rs b/src/main.rs index 13d24ef..6226b99 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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> { .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() );