Add media description to output and remove URL wrapping

URL wrapping is hell for clicking
This commit is contained in:
Huy Ngo 2024-07-18 16:32:25 +07:00
parent b35facb84c
commit df0b878e04

View file

@ -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'<yellow>Description</yellow>: {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)