mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
Show full account name in timeline
This commit is contained in:
parent
5a867f2380
commit
10595be865
@ -123,7 +123,7 @@ def test_timeline(mock_get, monkeypatch, capsys):
|
|||||||
'id': '111111111111111111',
|
'id': '111111111111111111',
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Frank Zappa 🎸',
|
'display_name': 'Frank Zappa 🎸',
|
||||||
'username': 'fz'
|
'acct': 'fz'
|
||||||
},
|
},
|
||||||
'created_at': '2017-04-12T15:53:18.174Z',
|
'created_at': '2017-04-12T15:53:18.174Z',
|
||||||
'content': "<p>The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.</p>",
|
'content': "<p>The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.</p>",
|
||||||
@ -159,12 +159,12 @@ def test_timeline_with_re(mock_get, monkeypatch, capsys):
|
|||||||
'created_at': '2017-04-12T15:53:18.174Z',
|
'created_at': '2017-04-12T15:53:18.174Z',
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Frank Zappa',
|
'display_name': 'Frank Zappa',
|
||||||
'username': 'fz'
|
'acct': 'fz'
|
||||||
},
|
},
|
||||||
'reblog': {
|
'reblog': {
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Johnny Cash',
|
'display_name': 'Johnny Cash',
|
||||||
'username': 'jc'
|
'acct': 'jc'
|
||||||
},
|
},
|
||||||
'content': "<p>The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.</p>",
|
'content': "<p>The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows.</p>",
|
||||||
'media_attachments': [],
|
'media_attachments': [],
|
||||||
@ -201,7 +201,7 @@ def test_thread(mock_get, monkeypatch, capsys):
|
|||||||
'id': '111111111111111111',
|
'id': '111111111111111111',
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Frank Zappa',
|
'display_name': 'Frank Zappa',
|
||||||
'username': 'fz'
|
'acct': 'fz'
|
||||||
},
|
},
|
||||||
'created_at': '2017-04-12T15:53:18.174Z',
|
'created_at': '2017-04-12T15:53:18.174Z',
|
||||||
'content': "my response in the middle",
|
'content': "my response in the middle",
|
||||||
@ -214,7 +214,7 @@ def test_thread(mock_get, monkeypatch, capsys):
|
|||||||
'id': '111111111111111110',
|
'id': '111111111111111110',
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Frank Zappa',
|
'display_name': 'Frank Zappa',
|
||||||
'username': 'fz'
|
'acct': 'fz'
|
||||||
},
|
},
|
||||||
'created_at': '2017-04-12T15:53:18.174Z',
|
'created_at': '2017-04-12T15:53:18.174Z',
|
||||||
'content': "original content",
|
'content': "original content",
|
||||||
@ -225,7 +225,7 @@ def test_thread(mock_get, monkeypatch, capsys):
|
|||||||
'id': '111111111111111112',
|
'id': '111111111111111112',
|
||||||
'account': {
|
'account': {
|
||||||
'display_name': 'Frank Zappa',
|
'display_name': 'Frank Zappa',
|
||||||
'username': 'fz'
|
'acct': 'fz'
|
||||||
},
|
},
|
||||||
'created_at': '2017-04-12T15:53:18.174Z',
|
'created_at': '2017-04-12T15:53:18.174Z',
|
||||||
'content': "response message",
|
'content': "response message",
|
||||||
|
@ -136,7 +136,7 @@ def print_status(status, width):
|
|||||||
time = datetime.strptime(time, "%Y-%m-%dT%H:%M:%S.%fZ")
|
time = datetime.strptime(time, "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||||
time = time.strftime('%Y-%m-%d %H:%M%z')
|
time = time.strftime('%Y-%m-%d %H:%M%z')
|
||||||
|
|
||||||
username = "@" + status['account']['username']
|
username = "@" + status['account']['acct']
|
||||||
spacing = width - wcswidth(username) - wcswidth(time)
|
spacing = width - wcswidth(username) - wcswidth(time)
|
||||||
|
|
||||||
display_name = status['account']['display_name']
|
display_name = status['account']['display_name']
|
||||||
@ -166,7 +166,7 @@ def print_status(status, width):
|
|||||||
print_out("\n{}{}{}".format(
|
print_out("\n{}{}{}".format(
|
||||||
"ID <yellow>{}</yellow> ".format(status['id']),
|
"ID <yellow>{}</yellow> ".format(status['id']),
|
||||||
"↲ In reply to <yellow>{}</yellow> ".format(in_reply_to) if in_reply_to else "",
|
"↲ In reply to <yellow>{}</yellow> ".format(in_reply_to) if in_reply_to else "",
|
||||||
"↻ Reblogged <blue>@{}</blue> ".format(reblog['account']['username']) if reblog else "",
|
"↻ Reblogged <blue>@{}</blue> ".format(reblog['account']['acct']) if reblog else "",
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user