chip-job-download-encode 751 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
import chipathlon.utils
import argparse

parser = argparse.ArgumentParser(description="Download target file.")
parser.add_argument("-u", "--url", dest="url", required=True, help="Target url.")
parser.add_argument("-p", "--path", dest="path", required=True, help="Local path to file.")
parser.add_argument("-t", "--url_type", dest="url_type", default="http://", help="Type of url to access.")
parser.add_argument("-r", "--retries", dest="retries", default=3, type=int, help="Number of retries.")
parser.add_argument("-n", "--overwrite", dest="overwrite", default=True, action="store_false", help="Dont' overwrite local file if exists.")
parser.add_argument("-m", "--md5", dest="md5", help="Check md5 value against passed value.")