This commit is contained in:
Stanislas Jouffroy 2025-05-20 01:07:17 +02:00
parent 5ddc5e7446
commit 090325aafa

View file

@ -17,7 +17,6 @@ def main():
menu_file.write_bytes(menu_pdf) menu_file.write_bytes(menu_pdf)
text = extract_text(menu_file, page_numbers=[0]) text = extract_text(menu_file, page_numbers=[0])
# print(text)
previous_was_title = False previous_was_title = False
curated_text = "" curated_text = ""
@ -37,16 +36,14 @@ def main():
curated_text += f"{line}\n" curated_text += f"{line}\n"
previous_was_title = False previous_was_title = False
print(curated_text)
cells = curated_text.split("\n\n") cells = curated_text.split("\n\n")
# remove month # remove month
month = cells.pop(0) month = cells.pop(0)
# remove meals titles # remove meals titles
meal = {}
for i in range(5): for i in range(5):
meal.update({i: cells.pop(0)}) cells.pop(0)
days = [] days = []
for i in range(5): for i in range(5):