-
Notifications
You must be signed in to change notification settings - Fork 1
/
datagetter.py
executable file
·46 lines (34 loc) · 1.85 KB
/
datagetter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
from getter.get import get
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--no-download', dest='download', action='store_false',
help="Don't download any files only convert existing data")
parser.add_argument('--local-registry', dest='local_registry', action='store',
help="Use a local registry file rather than registry.threesixtygiving.org",
default=False)
parser.add_argument('--no-convert', dest='convert', action='store_false')
parser.add_argument('--no-convert-big-files', dest='convert_big_files', action='store_false')
parser.add_argument('--no-validate', dest='validate', action='store_false')
parser.add_argument('--data-dir', dest='data_dir', action='store',
default="data")
parser.add_argument('--threads', dest='threads', action='store', type=int,
default=4)
parser.add_argument('--socks5', dest='socks5_proxy', action='store',
help="Use a socks5 proxy to fetch publisher data. Example --socks5=socks5://host:port",
default=None)
parser.add_argument('--limit-downloads', dest='limit_downloads', action='store',
type=int,
help="Limit the number of file downloads",
default=None)
parser.add_argument('--schema-branch', dest='schema_branch', action='store',
type=str,
help="Specify a git branch of the 360Giving schema",
default='master')
parser.add_argument("--publishers", nargs="+", dest="publisher_prefixes", action="store",
type=str, help="Only download for selected publishers")
args = parser.parse_args()
get(args)
if __name__ == "__main__":
main()