Mercurial > hg > webaudioevaluationtool
diff scripts/comment_parser.py @ 880:24d0d3111c00
Scripts: added 'confidence interval plot' (rigorous checking needed) and minor fixes to other scripts.
author | Brecht De Man <BrechtDeMan@users.noreply.github.com> |
---|---|
date | Thu, 25 Jun 2015 17:14:33 +0100 |
parents | 302926cdf3c4 |
children | cd20f076f6a3 |
line wrap: on
line diff
--- a/scripts/comment_parser.py Thu Jun 25 16:40:39 2015 +0100 +++ b/scripts/comment_parser.py Thu Jun 25 17:14:33 2015 +0100 @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- import xml.etree.ElementTree as ET import os @@ -22,7 +23,7 @@ os.makedirs(page_name) # for page [page_name], print comments related to fragment [id] - for audioelement in root.findall("*/[@id='"+page_name+"']/audioelement"): + for audioelement in root.findall("*/[@id='"+page_name+"']/audioelement"): #TODO in audioholder.findall(...) if audioelement is not None: # Check it exists audio_id = str(audioelement.get('id')) @@ -44,9 +45,9 @@ writer.writerow(['']) else: # anonymous comments: - writer.writerow([commentstr]) + writer.writerow([commentstr.encode("utf-8")]) # comments with (file) name: - #writer.writerow([file[:-4]] + [commentstr]) + #writer.writerow([file[:-4]] + [commentstr.encode("utf-8")]) #TODO Replace 'new line' in comment with something else?