options are organized in groups
This commit is contained in:
parent
1be085976e
commit
aeb59a8dc0
1 changed files with 10 additions and 6 deletions
16
feed
16
feed
|
@ -151,15 +151,19 @@ def get_duration(url):
|
||||||
|
|
||||||
def get_parser():
|
def get_parser():
|
||||||
p = ArgumentParser('Get music from a (well-specified) xml feed')
|
p = ArgumentParser('Get music from a (well-specified) xml feed')
|
||||||
|
src = p.add_argument_group('sources', 'How to deal with sources')
|
||||||
|
p.add_argument('--source-weights',
|
||||||
|
help='Select only one "source" based on this weights')
|
||||||
|
|
||||||
|
filters = p.add_argument_group('filters', 'Select only items that match these conditions')
|
||||||
|
filters.add_argument('--max-len', default=0, type=int,
|
||||||
|
help='Exclude any audio that is longer than MAXLEN seconds')
|
||||||
|
filters.add_argument('--random', default=False,
|
||||||
|
action='store_true', help='Pick randomly')
|
||||||
|
|
||||||
p.add_argument('--start', default=0, type=int,
|
p.add_argument('--start', default=0, type=int,
|
||||||
help='0-indexed start number. '
|
help='0-indexed start number. '
|
||||||
'By default, play from most recent')
|
'By default, play from most recent')
|
||||||
p.add_argument('--max-len', default=0, type=int,
|
|
||||||
help='Exclude any audio that is longer than MAXLEN seconds')
|
|
||||||
p.add_argument('--random', default=False,
|
|
||||||
action='store_true', help='Pick randomly')
|
|
||||||
p.add_argument('--source-weights',
|
|
||||||
help='Select only one "source" based on this weights')
|
|
||||||
p.add_argument('--howmany', default=1, type=int,
|
p.add_argument('--howmany', default=1, type=int,
|
||||||
help='If not specified, only 1 will be played')
|
help='If not specified, only 1 will be played')
|
||||||
p.add_argument('--slotsize', help='Seconds between each audio', type=int)
|
p.add_argument('--slotsize', help='Seconds between each audio', type=int)
|
||||||
|
|
Loading…
Reference in a new issue