1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Support -l/--local argument in timeline command

This commit is contained in:
kakakaya 2018-03-06 03:13:45 +09:00
parent 3f1550b153
commit 9bea7377eb
2 changed files with 11 additions and 2 deletions

View File

@ -54,7 +54,10 @@ def _parse_timeline(item):
def timeline(app, user, args):
items = api.timeline_home(app, user)
if args.local:
items = api.timeline_public(app, user, local=True)
else:
items = api.timeline_home(app, user)
parsed_items = [_parse_timeline(t) for t in items]
print_out("" * 31 + "" + "" * 88)

View File

@ -132,7 +132,13 @@ READ_COMMANDS = [
Command(
name="timeline",
description="Show recent items in your public timeline",
arguments=[],
arguments=[
(["-l", "--local"], {
"action": 'store_true',
"default": False,
"help": "Show local timeline instead of public timeline.",
}),
],
require_auth=True,
),
Command(