HTML helper: automatically add a heading while we’re at it

master
BodgeMaster 2023-09-03 12:34:17 +02:00
parent 1cf4ad9372
commit bc53f6b592
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ 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")
destination_file.write(template_lines[0]) destination_file.write(template_lines[0])
destination_file.write("\n<h1> "+chapter_name+"</h1>\n")
element_type="" element_type=""
next_source_line = source_file.readline() next_source_line = source_file.readline()