Fix alignment in timeline
This commit is contained in:
parent
e1cfda1acb
commit
3f79b76aab
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ from itertools import chain
|
||||||
from itertools import zip_longest
|
from itertools import zip_longest
|
||||||
from textwrap import wrap, TextWrapper
|
from textwrap import wrap, TextWrapper
|
||||||
|
|
||||||
from toot.utils import format_content, get_text
|
from toot.utils import format_content, get_text, trunc
|
||||||
|
|
||||||
START_CODES = {
|
START_CODES = {
|
||||||
'red': '\033[31m',
|
'red': '\033[31m',
|
||||||
|
@ -138,7 +138,7 @@ def print_timeline(items):
|
||||||
return zip_longest(left_column, right_column, fillvalue="")
|
return zip_longest(left_column, right_column, fillvalue="")
|
||||||
|
|
||||||
for left, right in timeline_rows(item):
|
for left, right in timeline_rows(item):
|
||||||
print_out("{:30} │ {}".format(left, right))
|
print_out("{:30} │ {}".format(trunc(left, 30), right))
|
||||||
|
|
||||||
def _parse_item(item):
|
def _parse_item(item):
|
||||||
content = item['reblog']['content'] if item['reblog'] else item['content']
|
content = item['reblog']['content'] if item['reblog'] else item['content']
|
||||||
|
|
Loading…
Reference in a new issue