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:
parent
3f1550b153
commit
9bea7377eb
@ -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)
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user