From df0b878e04d9561dd2dd89cd27c32c3924d4e84e Mon Sep 17 00:00:00 2001 From: Huy Ngo Date: Thu, 18 Jul 2024 16:32:25 +0700 Subject: [PATCH] Add media description to output and remove URL wrapping URL wrapping is hell for clicking --- witchie/output.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/witchie/output.py b/witchie/output.py index 3e5cdf0..14153f1 100644 --- a/witchie/output.py +++ b/witchie/output.py @@ -307,10 +307,12 @@ def print_status(status: Status, width: int = 80): if status.media_attachments: print_out("\nMedia:") - for attachment in status.media_attachments: + for count, attachment in enumerate(status.media_attachments): url = attachment.url - for line in wc_wrap(url, width): - print_out(line) + description = f'Description: {attachment.description}' + print_out(f'{count+1}. URL: {url}') + for line in wc_wrap(description, width): + print_out(description) if status.poll: print_poll(status.poll)