Fix file.write() and \company typos
This commit is contained in:
parent
3cdbfdcb04
commit
178bdb5955
5
latty.py
5
latty.py
|
@ -27,9 +27,6 @@ class CLData():
|
|||
("body", self.body),
|
||||
]
|
||||
|
||||
def define(file, name, data, whitespace=""):
|
||||
file.write("\\def \\" + name + "{" + data + whitespace + "}\n")
|
||||
|
||||
def get_unique():
|
||||
import uuid
|
||||
unique = str(uuid.uuid1().hex)
|
||||
|
@ -44,7 +41,7 @@ def generate(data: CLData):
|
|||
unique_file = output_dir + unique + ".tex"
|
||||
f = open(unique_file, "w")
|
||||
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.close()
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
\begin{document}
|
||||
\begin{letter}{}
|
||||
|
||||
\opening{Dear \thecompany,}
|
||||
\opening{Dear \company,}
|
||||
|
||||
\body
|
||||
|
||||
|
|
Loading…
Reference in New Issue