X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=compile.py;h=0e7d237f84aaf871c87b530e0bdb927a1ed4d273;hb=0e1fd953024122aa13ef8dcc62318f2c7c275fbb;hp=442ee8bfcbd5be689038486ed836b66be4ec6768;hpb=10cb3cc04bb5fe5abe2e9ca1bf29a417c07cb5a8;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git
diff --git a/compile.py b/compile.py
index 442ee8b..0e7d237 100644
--- a/compile.py
+++ b/compile.py
@@ -1,12 +1,13 @@
import os
import re
import datetime
+from io import open
# This script generates the bip39-standalone.html file.
# It removes script and style tags and replaces with the file content.
-f = open('src/index.html')
+f = open('src/index.html', "r", encoding="utf-8")
page = f.read()
f.close()
@@ -18,7 +19,7 @@ scripts = scriptsFinder.findall(page)
for script in scripts:
filename = os.path.join("src", script)
- s = open(filename)
+ s = open(filename, "r", encoding="utf-8")
scriptContent = "" % s.read()
s.close()
scriptTag = """""" % script
@@ -32,7 +33,7 @@ styles = stylesFinder.findall(page)
for style in styles:
filename = os.path.join("src", style)
- s = open(filename)
+ s = open(filename, "r", encoding="utf-8")
styleContent = "" % s.read()
s.close()
styleTag = """""" % style
@@ -41,7 +42,7 @@ for style in styles:
# Write the standalone file
-f = open('bip39-standalone.html', 'w')
+f = open('bip39-standalone.html', 'w', encoding="utf-8")
f.write(page)
f.close()