|
10 | 10 |
|
11 | 11 | # jap_5ThOJ14yf7z1EPEUpAoZYMWoETZcmJk305719
|
12 | 12 |
|
13 |
| -def get_met(): |
14 |
| - tease = os.getenv['TEASE'] |
| 13 | +def parse_cmd(): |
| 14 | + #parse command line for TEASE var |
| 15 | + import argparse |
| 16 | + parser = argparse.ArgumentParser(description='API File to Pull Subject Data from Jatos') |
| 17 | + parser.add_argument('-t', type=str, help='TEASE') |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +def get_met(tease): |
| 22 | + |
15 | 23 |
|
16 | 24 | proxies = {
|
17 |
| - 'http': f'http:zjgilliam:{tease}//proxy.divms.uiowa.edu:8888', |
18 |
| - 'https': f'https://zjgilliam:{tease}proxy.divms.uiowa.edu:8888', |
| 25 | + 'http': f'http:zjgilliam:{tease}@proxy.divms.uiowa.edu:8888', |
| 26 | + 'https': f'https://zjgilliam:{tease}@proxy.divms.uiowa.edu:8888', |
19 | 27 | }
|
20 | 28 |
|
21 | 29 |
|
@@ -62,12 +70,13 @@ def get_met():
|
62 | 70 |
|
63 | 71 | return study_result_ids
|
64 | 72 |
|
65 |
| -def get_data(study_result_ids): |
66 |
| - tease = os.getenv['TEASE'] |
| 73 | +def get_data(study_result_ids, tease): |
| 74 | + |
| 75 | + |
67 | 76 |
|
68 | 77 | proxies = {
|
69 |
| - 'http': f'http:zjgilliam:{tease}//proxy.divms.uiowa.edu:8888', |
70 |
| - 'https': f'https://zjgilliam:{tease}proxy.divms.uiowa.edu:8888', |
| 78 | + 'http': f'http:zjgilliam:{tease}@proxy.divms.uiowa.edu:8888', |
| 79 | + 'https': f'https://zjgilliam:{tease}@proxy.divms.uiowa.edu:8888', |
71 | 80 | }
|
72 | 81 |
|
73 | 82 | headers = {
|
@@ -224,8 +233,10 @@ def push():
|
224 | 233 |
|
225 | 234 |
|
226 | 235 | def main():
|
227 |
| - study_result_ids = get_met() |
228 |
| - get_data(study_result_ids) |
| 236 | + args = parse_cmd() |
| 237 | + tease = args.t |
| 238 | + study_result_ids = get_met(tease) |
| 239 | + get_data(study_result_ids, tease) |
229 | 240 | convert_beh()
|
230 | 241 | txt_files = []
|
231 | 242 | for root, dirs, files in os.walk('./data/raw'):
|
|
0 commit comments