diff options
Diffstat (limited to '')
-rw-r--r-- | sjdbmk/menu.py | 6 | ||||
-rw-r--r-- | sjdbmk/weekly.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sjdbmk/menu.py b/sjdbmk/menu.py index 85d8589..d966ee5 100644 --- a/sjdbmk/menu.py +++ b/sjdbmk/menu.py @@ -170,9 +170,9 @@ def parse_snacks(datetime_target: datetime.datetime) -> dict[str, list[str]]: raise ValueError("snacks not found") i += 2 return { - "Morning": row[i][2:7], - "Afternoon": row[i + 1][2:7], - "Evening": row[i + 2][2:7], + "Morning": [a.value for a in rows[i][2:7]], + "Afternoon": [a.value for a in rows[i + 1][2:7]], + "Evening": [a.value for a in rows[i + 2][2:7]], } # parse_meal_table(rows, i) diff --git a/sjdbmk/weekly.py b/sjdbmk/weekly.py index fa73d55..565e8c8 100644 --- a/sjdbmk/weekly.py +++ b/sjdbmk/weekly.py @@ -91,6 +91,7 @@ def generate( the_week_ahead_aod_page_number, ) menu_data = menu.parse_menus(datetime_target) + snack_data = menu.parse_snacks(datetime_target) logger.info("Packing final data") final_data = { @@ -98,6 +99,7 @@ def generate( "community_time": community_time, "aods": aods, "menu": menu_data, + "snacks": snack_data, } logger.info("Dumping data to: %s" % output_filename) |