feat: add docstring, specific encoding.
This commit is contained in:
parent
053ff7dc06
commit
0ab67b9864
1 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue