Further cleanups.

This commit is contained in:
Timothy Allen 2018-05-11 20:07:17 +02:00
parent c8796bf210
commit 8c039a4ea7

View File

@ -94,7 +94,6 @@ def main():
entries.append(entry)
elif comment.get('type') == 'treatment':
print("here")
for t in ( 'long-acting', 'rapid-acting', 'food', 'sport' ):
if comment.get(t) is not None:
treatment = {
@ -150,7 +149,7 @@ def main():
for page, form in actions.items():
''' Upload data in groups of 100 entries, to avoid timeouts from large datasets '''
for chunk in chunks(form, 100):
print(json.dumps(chunk))
#print(json.dumps(chunk))
try:
url = args.server + page
print(url)
@ -255,7 +254,6 @@ def parse_comments(data):
if relevant is not None:
comment_type = relevant.group(1)
comment_value = relevant.group(2)
print(comment_type)
if comment_type == 'Long-acting insulin':
comment['type'] = 'treatment'
comment['long-acting'] = comment_value