Mercurial > hg > webaudioevaluationtool
comparison python/score_parser.py @ 2947:c823f62714a2
Update score_parser.py
Add condition to exclude parsing scores of outside references.
author | iiphii <epdamskagg@gmail.com> |
---|---|
date | Fri, 06 Oct 2017 03:20:23 +0300 |
parents | 151ae5a4b979 |
children | d5c20bd0eb62 aa86f045d338 |
comparison
equal
deleted
inserted
replaced
2945:142df41a1aeb | 2947:c823f62714a2 |
---|---|
74 # go to fragment column, or create new column if it doesn't exist yet | 74 # go to fragment column, or create new column if it doesn't exist yet |
75 | 75 |
76 # get alphabetical array of fragment IDs from this subject's XML | 76 # get alphabetical array of fragment IDs from this subject's XML |
77 fragmentnamelist = [] # make empty list | 77 fragmentnamelist = [] # make empty list |
78 for audioelement in page.findall("./audioelement"): # iterate over all audioelements | 78 for audioelement in page.findall("./audioelement"): # iterate over all audioelements |
79 fragmentnamelist.append(audioelement.get('ref')) # add to list | 79 if audioelement is not None and audioelement.get('type') != "outside-reference": |
80 fragmentnamelist.append(audioelement.get('ref')) # add to list | |
80 | 81 |
81 fragmentnamelist = sorted(fragmentnamelist); # Sort the list | 82 fragmentnamelist = sorted(fragmentnamelist); # Sort the list |
82 storage[page_name]['header'] = fragmentnamelist; | 83 storage[page_name]['header'] = fragmentnamelist; |
83 | 84 |
84 for fragmentname in fragmentnamelist: | 85 for fragmentname in fragmentnamelist: |