1
0
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:
kakakaya 2018-03-06 03:13:45 +09:00 committed by Ivan Habunek
parent 08c5226ae2
commit 406943237a
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 11 additions and 2 deletions

View File

@ -8,6 +8,9 @@ from toot.utils import assert_domain_exists
def timeline(app, user, args):
if args.local:
items = api.timeline_public(app, user, local=True)
else:
items = api.timeline_home(app, user)
print_timeline(items)

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(