added proper lambda job

This commit is contained in:
Jun-te Kim 2025-08-26 15:27:41 +01:00
parent 33f03644d5
commit b12e393b3b

View file

@ -204,13 +204,17 @@ def handler(event, context):
local_path = download_private_s3_file(file_uri)
# Local development of file, please comment out for prod
local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/67-Aylestone-Road-1.pdf"))
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/67-Aylestone-Road-1.pdf"))
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/2-Wilford-Crescent-West.pdf"))
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/3-Carlinghow-court.pdf"))
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/26-Marden-Road.pdf"))
# local_path = os.path.join(os.path.join(os.getcwd(), "../../../../../", "home/Downloads/works/67-Aylestone-Road-1.pdf"))
print("Extracting file...")
reader = pdfReaderToText(local_path)
obj2 = WarmHomesConditionReport(reader.text_list, debug=True)
# obj2 = WarmHomesConditionReport(reader.text_list, debug=True)
obj = WarmHomesConditionReport(reader.text_list)
json_ = make_final_json(
obj.master_obj[0],