aboutsummaryrefslogtreecommitdiff
path: root/compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'compile.py')
-rw-r--r--compile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/compile.py b/compile.py
index 442ee8b..ac95273 100644
--- a/compile.py
+++ b/compile.py
@@ -6,7 +6,7 @@ import datetime
6 6
7# It removes script and style tags and replaces with the file content. 7# It removes script and style tags and replaces with the file content.
8 8
9f = open('src/index.html') 9f = open('src/index.html', "r", encoding="utf-8")
10page = f.read() 10page = f.read()
11f.close() 11f.close()
12 12
@@ -18,7 +18,7 @@ scripts = scriptsFinder.findall(page)
18 18
19for script in scripts: 19for script in scripts:
20 filename = os.path.join("src", script) 20 filename = os.path.join("src", script)
21 s = open(filename) 21 s = open(filename, "r", encoding="utf-8")
22 scriptContent = "<script>%s</script>" % s.read() 22 scriptContent = "<script>%s</script>" % s.read()
23 s.close() 23 s.close()
24 scriptTag = """<script src="%s"></script>""" % script 24 scriptTag = """<script src="%s"></script>""" % script
@@ -32,7 +32,7 @@ styles = stylesFinder.findall(page)
32 32
33for style in styles: 33for style in styles:
34 filename = os.path.join("src", style) 34 filename = os.path.join("src", style)
35 s = open(filename) 35 s = open(filename, "r", encoding="utf-8")
36 styleContent = "<style>%s</style>" % s.read() 36 styleContent = "<style>%s</style>" % s.read()
37 s.close() 37 s.close()
38 styleTag = """<link rel="stylesheet" href="%s">""" % style 38 styleTag = """<link rel="stylesheet" href="%s">""" % style
@@ -41,7 +41,7 @@ for style in styles:
41 41
42# Write the standalone file 42# Write the standalone file
43 43
44f = open('bip39-standalone.html', 'w') 44f = open('bip39-standalone.html', 'w', encoding="utf-8")
45f.write(page) 45f.write(page)
46f.close() 46f.close()
47 47