diff --git a/extract_romset.py b/extract_romset.py index 0d8aa09..f116c53 100755 --- a/extract_romset.py +++ b/extract_romset.py @@ -1,5 +1,9 @@ #!/usr/bin/env python +""" +Extracts description from datalist +""" + import os import sys import xml.etree.ElementTree as ET @@ -12,5 +16,5 @@ for game in root.findall("game"): textFile = os.path.splitext(f"{romName}")[0] + ".txt" os.makedirs("text", exist_ok=True) - with open(f"text/{textFile}", "w") as f: + with open(f"text/{textFile}", "w", encoding="utf-8") as f: f.write(game.find("description").text)