Mercurial > hg > webaudioevaluationtool
comparison scripts/timeline_view.py @ 885:ba83143187d6
Scripts: score_parser.py: ignore empty rows (subject with no ratings for current song)
author | Brecht De Man <BrechtDeMan@users.noreply.github.com> |
---|---|
date | Mon, 29 Jun 2015 19:02:48 +0100 |
parents | 1dd209550560 |
children | 4345ba8a1b6e b7fd0296c6ab |
comparison
equal
deleted
inserted
replaced
884:1dd209550560 | 885:ba83143187d6 |
---|---|
26 # create timeline_folder if not yet created | 26 # create timeline_folder if not yet created |
27 if not os.path.exists(timeline_folder): | 27 if not os.path.exists(timeline_folder): |
28 os.makedirs(timeline_folder) | 28 os.makedirs(timeline_folder) |
29 | 29 |
30 # get every XML file in folder | 30 # get every XML file in folder |
31 for file in os.listdir(folder_name): # You have to put this script in folder where output XML files are. | 31 for file in os.listdir(folder_name): |
32 if file.endswith(".xml"): | 32 if file.endswith(".xml"): |
33 tree = ET.parse(folder_name + '/' + file) | 33 tree = ET.parse(folder_name + '/' + file) |
34 root = tree.getroot() | 34 root = tree.getroot() |
35 subject_id = file[:-4] # drop '.xml' | 35 subject_id = file[:-4] # drop '.xml' |
36 | 36 |