From 178bdb5955eca9b7b6f26cdd620f56991ce35afa Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 27 Jul 2021 07:09:26 -0400 Subject: [PATCH] Fix file.write() and \company typos --- latty.py | 5 +---- writing_templates/base.tex | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/latty.py b/latty.py index 8626578..7727af3 100644 --- a/latty.py +++ b/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() diff --git a/writing_templates/base.tex b/writing_templates/base.tex index 45f03e7..35537cf 100644 --- a/writing_templates/base.tex +++ b/writing_templates/base.tex @@ -5,7 +5,7 @@ \begin{document} \begin{letter}{} -\opening{Dear \thecompany,} +\opening{Dear \company,} \body