HTML helper: fix a bug and its impact
parent
548417a836
commit
a18ee16702
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html><html><head><title> Chapter Name </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
<!DOCTYPE html><html><head><title> A Simple Errand </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
||||||
|
|
||||||
<h1> A Simple Errand</h1>
|
<h1> A Simple Errand</h1>
|
||||||
<p class="comment">
|
<p class="comment">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html><html><head><title> Chapter Name </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
<!DOCTYPE html><html><head><title> Eventful Evening </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
||||||
|
|
||||||
<h1> Eventful Evening</h1>
|
<h1> Eventful Evening</h1>
|
||||||
<p class="comment">
|
<p class="comment">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html><html><head><title> Chapter Name </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
<!DOCTYPE html><html><head><title> Library At Night </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
||||||
|
|
||||||
<h1> Library At Night</h1>
|
<h1> Library At Night</h1>
|
||||||
<p class="comment">
|
<p class="comment">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html><html><head><title> Chapter Name </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
<!DOCTYPE html><html><head><title> Who died today? </title><link rel="stylesheet" type="text/css" href="html_resources/style.css"></head><body>
|
||||||
|
|
||||||
<h1> Who Died Today?</h1>
|
<h1> Who Died Today?</h1>
|
||||||
<p class="comment">
|
<p class="comment">
|
||||||
|
|
|
@ -40,7 +40,7 @@ if os.path.isfile(sys.argv[2]):
|
||||||
chapter_name = input("Chapter name: ")
|
chapter_name = input("Chapter name: ")
|
||||||
template_file = open("html_resources/template.html", "r")
|
template_file = open("html_resources/template.html", "r")
|
||||||
template_lines = template_file.readlines();
|
template_lines = template_file.readlines();
|
||||||
template_lines[0].replace("Chapter Name", chapter_name)
|
template_lines[0] = template_lines[0].replace("Chapter Name", chapter_name)
|
||||||
|
|
||||||
source_file = open(sys.argv[1], "r", encoding="utf-8")
|
source_file = open(sys.argv[1], "r", encoding="utf-8")
|
||||||
destination_file = open(sys.argv[2], "w", encoding="ascii")
|
destination_file = open(sys.argv[2], "w", encoding="ascii")
|
||||||
|
|
Loading…
Reference in New Issue