From aeb59a8dc0ad9774dc2f326ec57362c86d3abe0c Mon Sep 17 00:00:00 2001 From: boyska Date: Tue, 13 Feb 2018 20:20:06 +0100 Subject: [PATCH] options are organized in groups --- feed | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/feed b/feed index 47512e8..efb494a 100755 --- a/feed +++ b/feed @@ -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)