|
@@ -151,15 +151,19 @@ def get_duration(url):
|
|
|
|
|
|
def get_parser():
|
|
|
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,
|
|
|
help='0-indexed start number. '
|
|
|
'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,
|
|
|
help='If not specified, only 1 will be played')
|
|
|
p.add_argument('--slotsize', help='Seconds between each audio', type=int)
|