def main(args): files = getContents(args.product,args.contents,outfolder=args.outputFolder,bounds=args.bounds, starttime=args.startTime,endtime=args.endTime,magrange=args.magRange, catalog=args.catalog,contributor=args.contributor,eventid=args.eventid, listURL=args.listURL,eventProperties=args.eventProperties, productProperties=args.productProperties,since=args.after, getAll=args.getAll) print print '%i files were downloaded to %s' % (len(files),args.outputFolder)
def main(args): files = getContents(args.product, args.contents, outfolder=args.outputFolder, bounds=args.bounds, starttime=args.startTime, endtime=args.endTime, magrange=args.magRange, catalog=args.catalog, contributor=args.contributor, eventid=args.eventid, listURL=args.listURL, eventProperties=args.eventProperties, productProperties=args.productProperties, since=args.after, getAll=args.getAll) print print '%i files were downloaded to %s' % (len(files), args.outputFolder)
'-t', '--event-property', dest='eventProperties', help='Event property (alert:yellow, status:REVIEWED, etc.).', type=makedict) parser.add_argument( '-l', '--list-url', dest='listURL', action='store_true', help='Only list urls for contents in events that match criteria.') args = parser.parse_args() files = getContents(args.product, args.contents, outfolder=args.outputFolder, bounds=args.bounds, starttime=args.startTime, endtime=args.endTime, magrange=args.magRange, catalog=args.catalog, contributor=args.contributor, eventid=args.eventid, listURL=args.listURL, eventProperties=args.eventProperties, productProperties=args.productProperties, since=args.after) print print '%i files were downloaded to %s' % (len(files), args.outputFolder)
parser.add_argument('-s','--start-time', dest='startTime', type=maketime, help='Start time for search (defaults to ~30 days ago). YYYY-mm-dd or YYYY-mm-ddTHH:MM:SS') parser.add_argument('-e','--end-time', dest='endTime', type=maketime, help='End time for search (defaults to current date/time). YYYY-mm-dd or YYYY-mm-ddTHH:MM:SS') parser.add_argument('-a','--after', dest='after', type=maketime, help='Limit to events after specified time. YYYY-mm-dd or YYYY-mm-ddTHH:MM:SS') parser.add_argument('-m','--mag-range', metavar=('minmag','maxmag'),dest='magRange', type=float,nargs=2, help='Min/max magnitude to restrict search.') parser.add_argument('-c','--catalog', dest='catalog', help='Source catalog from which products derive (atlas, centennial, etc.)') parser.add_argument('-n','--contributor', dest='contributor', help='Source contributor (who loaded product) (us, nc, etc.)') parser.add_argument('-i','--event-id', dest='eventid', help='Event ID from which to download product contents.') parser.add_argument('-p','--product-property', dest='productProperties', type=makedict, help='Product property (reviewstatus:approved).') parser.add_argument('-t','--event-property', dest='eventProperties', help='Event property (alert:yellow, status:REVIEWED, etc.).',type=makedict) parser.add_argument('-l','--list-url', dest='listURL', action='store_true', help='Only list urls for contents in events that match criteria.') args = parser.parse_args() files = getContents(args.product,args.contents,outfolder=args.outputFolder,bounds=args.bounds, starttime=args.startTime,endtime=args.endTime,magrange=args.magRange, catalog=args.catalog,contributor=args.contributor,eventid=args.eventid, listURL=args.listURL,eventProperties=args.eventProperties, productProperties=args.productProperties,since=args.after) print print '%i files were downloaded to %s' % (len(files),args.outputFolder)