Mercurial > hg > webaudioevaluationtool
comparison scripts/score_parser.py @ 2036:237570166d1f
Comment and rating scripts: robust against audioholders without id or audioelements; fixes issue where plots were not cleared before adding new content; showing legend optional; robust against non-UTF8 characters in legend names
author | Brecht De Man <b.deman@qmul.ac.uk> |
---|---|
date | Mon, 15 Jun 2015 13:09:46 +0100 |
parents | 7d3cbad47ae4 |
children | ab79d76c6f85 |
comparison
equal
deleted
inserted
replaced
2035:667d65aac3d6 | 2036:237570166d1f |
---|---|
16 | 16 |
17 # get list of all pages this subject evaluated | 17 # get list of all pages this subject evaluated |
18 for audioholder in root.findall("./audioholder"): # iterate over pages | 18 for audioholder in root.findall("./audioholder"): # iterate over pages |
19 page_name = audioholder.get('id') # get page name | 19 page_name = audioholder.get('id') # get page name |
20 #print ["DEBUG page " + page_name] | 20 #print ["DEBUG page " + page_name] |
21 | |
22 if page_name is None: # ignore 'empty' audio_holders | |
23 break | |
21 | 24 |
22 file_name = 'ratings/'+page_name+'-ratings.csv' # score file name | 25 file_name = 'ratings/'+page_name+'-ratings.csv' # score file name |
23 | 26 |
24 # create folder 'ratings if not yet created | 27 # create folder 'ratings if not yet created |
25 if not os.path.exists('ratings'): | 28 if not os.path.exists('ratings'): |