Apply paddings for image description too
This commit is contained in:
parent
041cb67746
commit
2989101e67
1 changed files with 5 additions and 5 deletions
|
@ -308,15 +308,15 @@ def print_status(status: Status, width: int = 80, padding: int = 0):
|
|||
print_html(status.content, width, padding)
|
||||
|
||||
if status.media_attachments:
|
||||
print_out(f"{"│" * padding}\n{"│" * padding} Media:")
|
||||
print_out(f"{'│' * padding}\n{'│' * padding}Media:")
|
||||
for count, attachment in enumerate(status.media_attachments):
|
||||
url = attachment.url
|
||||
description = f'{"│" * padding} Description: {attachment.description}'
|
||||
print_out(f'{"│" * padding} {count+1}. <yellow>URL</yellow>: {url}')
|
||||
for i, line in enumerate(wc_wrap(description, width)):
|
||||
description = f'Description: {attachment.description}'
|
||||
print_out(f'{"│" * padding}{count+1}. <yellow>URL</yellow>: {url}')
|
||||
for i, line in enumerate(wc_wrap(description, width - padding)):
|
||||
if i == 0:
|
||||
line = line.replace('Description', '<yellow>Description</yellow>')
|
||||
print_out(line)
|
||||
print_out('│' * padding + line)
|
||||
|
||||
if status.poll:
|
||||
print_poll(status.poll)
|
||||
|
|
Loading…
Reference in a new issue