def __init__(self, *args, **kwargs):
        """ Initialize a SatUtilsParser """
        super(SatUtilsParser, self).__init__(*args, **kwargs)
        self.formatter_class = argparse.ArgumentDefaultsHelpFormatter

        self.pparser = argparse.ArgumentParser(add_help=False)
        self.pparser.add_argument('--version', help='Print version and exit', action='version', version=__version__)
        self.pparser.add_argument('-v', '--verbosity', default=2, type=int,
                            help='0:quiet, 1:error, 2:warning, 3:info, 4:debug')

        self.download_parser = argparse.ArgumentParser(add_help=False)
        self.download_group = self.download_parser.add_argument_group('download options')
        self.download_group.add_argument('--datadir', help='Directory pattern to save assets', default=config.DATADIR)
        self.download_group.add_argument('--filename', default=config.FILENAME,
                           help='Save assets with this filename pattern based on metadata keys')
        self.download_group.add_argument('--download', help='Download assets', default=None, nargs='*')
        h = 'Acknowledge paying egress costs for downloads (if in request pays bucket)'
        self.download_group.add_argument('--requestor-pays', help=h, default=False, action='store_true', dest='requestor_pays')

        self.output_parser = argparse.ArgumentParser(add_help=False)
        self.output_group = self.output_parser.add_argument_group('output options')
        h = 'Print specified metadata for matched scenes'
        self.output_group.add_argument('--print-md', help=h, default=None, nargs='*', dest='printmd')
        h = 'Print calendar showing dates'
        self.output_group.add_argument('--print-cal', help=h, default=False, action='store_true', dest='printcal')
        self.output_group.add_argument('--save', help='Save results as GeoJSON', default=None)
def __init__ ( self , * args , ** kwargs ) : super ( SatUtilsParser , self ) . __init__ ( * args , ** kwargs ) self . formatter_class = argparse . ArgumentDefaultsHelpFormatter self . pparser = argparse . ArgumentParser ( add_help = False ) self . pparser . add_argument ( '--version' , help = 'Print version and exit' , action = 'version' , version = __version__ ) self . pparser . add_argument ( '-v' , '--verbosity' , default = 2 , type = int , help = '0:quiet, 1:error, 2:warning, 3:info, 4:debug' ) self . download_parser = argparse . ArgumentParser ( add_help = False ) self . download_group = self . download_parser . add_argument_group ( 'download options' ) self . download_group . add_argument ( '--datadir' , help = 'Directory pattern to save assets' , default = config . DATADIR ) self . download_group . add_argument ( '--filename' , default = config . FILENAME , help = 'Save assets with this filename pattern based on metadata keys' ) self . download_group . add_argument ( '--download' , help = 'Download assets' , default = None , nargs = '*' ) h = 'Acknowledge paying egress costs for downloads (if in request pays bucket)' self . download_group . add_argument ( '--requestor-pays' , help = h , default = False , action = 'store_true' , dest = 'requestor_pays' ) self . output_parser = argparse . ArgumentParser ( add_help = False ) self . output_group = self . output_parser . add_argument_group ( 'output options' ) h = 'Print specified metadata for matched scenes' self . output_group . add_argument ( '--print-md' , help = h , default = None , nargs = '*' , dest = 'printmd' ) h = 'Print calendar showing dates' self . output_group . add_argument ( '--print-cal' , help = h , default = False , action = 'store_true' , dest = 'printcal' ) self . output_group . add_argument ( '--save' , help = 'Save results as GeoJSON' , default = None )
Initialize a SatUtilsParser