Skip to content

Commit

Permalink
fix broken imports in report_generator, update .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisiia committed Apr 22, 2024
1 parent bfdf53e commit ffbd333
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
__pycache__
.env
.DS_Store
venv
report_out/*
out
node_modules
yarn.lock
7 changes: 4 additions & 3 deletions report_generator/report_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pylatex.utils import bold, NoEscape

import os
from os import join, dirname
from os import path
import sys

from util.parse_json import json_to_dict
Expand All @@ -28,8 +28,9 @@ def assemble_pdf(data: dict):
data = json_to_dict(data)

# load path to pdflatex
dotenv_path = join(dirname(__file__), '.env')
dotenv_path = path.join(path.dirname(__file__), '.env')
load_dotenv(dotenv_path)
print(dotenv_path)
PDFLATEX_PATH = os.environ.get('PDFLATEX_PATH')

doc = format_doc()
Expand All @@ -41,7 +42,7 @@ def assemble_pdf(data: dict):

doc.append(NewPage())

doc.generate_pdf('out/out', clean_tex=False, compiler=PDFLATEX_PATH)
doc.generate_pdf('report_out/report_out', clean_tex=False, compiler=PDFLATEX_PATH)
# doc = format_doc()
# doc.append(NewPage())
# doc.generate_pdf('out/out', clean_tex=False, compiler='pdflatex', silent=False)
Expand Down

0 comments on commit ffbd333

Please sign in to comment.