Fix file.write() and \company typos

This commit is contained in:
Sage Vaillancourt 2021-07-27 07:09:26 -04:00
parent 3cdbfdcb04
commit 178bdb5955
2 changed files with 2 additions and 5 deletions

View File

@ -27,9 +27,6 @@ class CLData():
("body", self.body), ("body", self.body),
] ]
def define(file, name, data, whitespace=""):
file.write("\\def \\" + name + "{" + data + whitespace + "}\n")
def get_unique(): def get_unique():
import uuid import uuid
unique = str(uuid.uuid1().hex) unique = str(uuid.uuid1().hex)
@ -44,7 +41,7 @@ def generate(data: CLData):
unique_file = output_dir + unique + ".tex" unique_file = output_dir + unique + ".tex"
f = open(unique_file, "w") f = open(unique_file, "w")
for pair in data.get_pairs(): for pair in data.get_pairs():
file.write("\\def \\" + pair[0] + "{" + pair[0] + "}\n") f.write("\\def \\" + pair[0] + "{" + pair[1] + "}\n")
f.write(open(proj_dir + "/writing_templates/base.tex", "r").read()) f.write(open(proj_dir + "/writing_templates/base.tex", "r").read())
f.close() f.close()

View File

@ -5,7 +5,7 @@
\begin{document} \begin{document}
\begin{letter}{} \begin{letter}{}
\opening{Dear \thecompany,} \opening{Dear \company,}
\body \body