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
08c5226ae2
commit
406943237a
@ -8,7 +8,10 @@ from toot.utils import assert_domain_exists
|
||||
|
||||
|
||||
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)
|
||||
print_timeline(items)
|
||||
|
||||
|
||||
|
@ -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