refacto
This commit is contained in:
parent
5ddc5e7446
commit
090325aafa
1 changed files with 1 additions and 4 deletions
5
main.py
5
main.py
|
@ -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):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue