From ebb3127dd2467c90a36f5e5088aead5c68c65166 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Mon, 3 Oct 2022 16:05:38 -0400 Subject: [PATCH] Try simplifying pdf_builder path setup. --- app/pdf_builder.py | 9 +++++---- app/routes.py | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/pdf_builder.py b/app/pdf_builder.py index 450ae27..20b7e8a 100644 --- a/app/pdf_builder.py +++ b/app/pdf_builder.py @@ -7,9 +7,8 @@ from dataclasses import dataclass from flask import send_from_directory, Response -root_dir = os.path.dirname(os.getcwd()) -proj_dir = root_dir + '/undercover/' -output_dir = proj_dir + 'outputs/' +proj_dir = os.path.dirname(os.getcwd()) +output_dir = proj_dir + '/outputs/' base_tex_text = open(proj_dir + '/letter_templates/base.tex', 'r').read() @@ -25,8 +24,9 @@ class CLData: jobAndPronoun: str skillTypes: str mySkills: str - closingText: str + body: str + closingText: str def get_pairs(self) -> list[(str, str)]: return [ @@ -35,6 +35,7 @@ class CLData: ('jobAndPronoun', self.jobAndPronoun), ('skillTypes', self.skillTypes), ('mySkills', self.mySkills), + ('closingText', self.closingText), ('body', self.body), ] diff --git a/app/routes.py b/app/routes.py index 41978ff..09d173c 100644 --- a/app/routes.py +++ b/app/routes.py @@ -1,7 +1,6 @@ # Copyright Sage Vaillancourt 2021 import json -import logging import os import subprocess import threading