# HG changeset patch # User Brecht De Man # Date 1465828780 -7200 # Node ID 3b2fe433b06a996c2e03a37449ffc0494f7bb23f # Parent 70163681378001a91ef7c7409b75327112f82f48 Comment parser: add 'value' cell, UTF encoding by default diff -r 701636813780 -r 3b2fe433b06a python/comment_parser.py --- a/python/comment_parser.py Sun Jun 05 16:26:58 2016 +0200 +++ b/python/comment_parser.py Mon Jun 13 16:39:40 2016 +0200 @@ -74,14 +74,17 @@ dialect="excel", quoting=csv.QUOTE_ALL) commentstr = audioelement.find("./comment/response").text + valuestr = audioelement.find("./value").text if commentstr is None: commentstr = '' + if valuestr is None: + valuestr = '' # anonymous comments: #writer.writerow([commentstr]) # .encode("utf-8") # comments with (file) name: - writer.writerow([file[:-4]] + [commentstr]) + writer.writerow([file[:-4]] + [valuestr] + [commentstr.encode("utf-8")]) #TODO Replace 'new line' in comment with something else?