mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -04:00
Support -l/--local argument in timeline command
This commit is contained in:
parent
08c5226ae2
commit
406943237a
@ -8,6 +8,9 @@ from toot.utils import assert_domain_exists
|
|||||||
|
|
||||||
|
|
||||||
def timeline(app, user, args):
|
def timeline(app, user, args):
|
||||||
|
if args.local:
|
||||||
|
items = api.timeline_public(app, user, local=True)
|
||||||
|
else:
|
||||||
items = api.timeline_home(app, user)
|
items = api.timeline_home(app, user)
|
||||||
print_timeline(items)
|
print_timeline(items)
|
||||||
|
|
||||||
|
@ -132,7 +132,13 @@ READ_COMMANDS = [
|
|||||||
Command(
|
Command(
|
||||||
name="timeline",
|
name="timeline",
|
||||||
description="Show recent items in your public 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,
|
require_auth=True,
|
||||||
),
|
),
|
||||||
Command(
|
Command(
|
||||||
|
Loading…
Reference in New Issue
Block a user