mirror of
https://github.com/ihabunek/toot.git
synced 2025-02-02 15:07:51 -05:00
Replace --list-id with --list
verbosity ftw
This commit is contained in:
parent
c26ccc13f9
commit
10f68fdab7
@ -9,8 +9,8 @@ from toot.utils import assert_domain_exists
|
|||||||
|
|
||||||
def timeline(app, user, args):
|
def timeline(app, user, args):
|
||||||
# Make sure tag, list and public are not used simultaneously
|
# Make sure tag, list and public are not used simultaneously
|
||||||
if len([arg for arg in [args.tag, args.list_id, args.public] if arg]) > 1:
|
if len([arg for arg in [args.tag, args.list, args.public] if arg]) > 1:
|
||||||
raise ConsoleError("Only one of --public --tag --list-id can be used at one time.")
|
raise ConsoleError("Only one of --public, --tag, or --list can be used at one time.")
|
||||||
|
|
||||||
if args.local and not (args.public or args.tag):
|
if args.local and not (args.public or args.tag):
|
||||||
raise ConsoleError("The --local option is only valid alongside --public or --tag.")
|
raise ConsoleError("The --local option is only valid alongside --public or --tag.")
|
||||||
@ -19,8 +19,8 @@ def timeline(app, user, args):
|
|||||||
items = api.timeline_public(app, user, local=args.local)
|
items = api.timeline_public(app, user, local=args.local)
|
||||||
elif args.tag:
|
elif args.tag:
|
||||||
items = api.timeline_tag(app, user, args.tag, local=args.local)
|
items = api.timeline_tag(app, user, args.tag, local=args.local)
|
||||||
elif args.list_id:
|
elif args.list:
|
||||||
items = api.timeline_list(app, user, args.list_id)
|
items = api.timeline_list(app, user, args.list)
|
||||||
else:
|
else:
|
||||||
items = api.timeline_home(app, user)
|
items = api.timeline_home(app, user)
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ READ_COMMANDS = [
|
|||||||
"type": str,
|
"type": str,
|
||||||
"help": "Show timeline for given hashtag.",
|
"help": "Show timeline for given hashtag.",
|
||||||
}),
|
}),
|
||||||
(["-i", "--list-id"], {
|
(["-i", "--list"], {
|
||||||
"type": int,
|
"type": int,
|
||||||
"help": "Show timeline for given list ID.",
|
"help": "Show timeline for given list ID.",
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user