""" Parse arguments. Returns a namespace as returned by argparse.ArgumentParser.parse_args(). """
importargparse
default_expiration_days=7
ap=argparse.ArgumentParser(
description="Acquire data needed to process a scan with cspp-geo-aitf. Symbolically links required files from the local cache into the destination. Will attempt to download file if preferred files are not locally available.",
epilog="""
A DATE is a date and optional time. The form "2021-02-27T14:50:00"
is recommended. The form "20210581450000" (YYYYjjjHHMMSSt) is also
understood.
""",
formatter_class=SmartFormatter# Protects blank line in epilog
)
ap.add_argument('scan_time',type=arg_datetime,
metavar='DATE',
help='scan time ancillary data is needed for')
ap.add_argument('destination',type=arg_directory,
metavar='FINAL_PATH',
help='write required files here, possibly as symbolic links')