Mercurial > hg > webaudioevaluationtool
changeset 2948:bfd19c39f2f3
Merge pull request #244 from iiphii/patch-1
Update score_parser.py
author | Nick Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Tue, 17 Oct 2017 21:46:16 +0100 |
parents | c496aef6448b (current diff) c823f62714a2 (diff) |
children | 311596aedb7b ab52da8becbe |
files | |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/score_parser.py Fri Oct 13 14:19:22 2017 +0200 +++ b/python/score_parser.py Tue Oct 17 21:46:16 2017 +0100 @@ -76,7 +76,8 @@ # get alphabetical array of fragment IDs from this subject's XML fragmentnamelist = [] # make empty list for audioelement in page.findall("./audioelement"): # iterate over all audioelements - fragmentnamelist.append(audioelement.get('ref')) # add to list + if audioelement is not None and audioelement.get('type') != "outside-reference": + fragmentnamelist.append(audioelement.get('ref')) # add to list fragmentnamelist = sorted(fragmentnamelist); # Sort the list storage[page_name]['header'] = fragmentnamelist; @@ -115,4 +116,4 @@ for value in storage[page_name]['axis'][axis_name][subject_id]: entry.append(value) filewriter.writerow(entry) - writefile.close() \ No newline at end of file + writefile.close()