From c290113bd1a8af694b648bba4c801e00b049683a Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 24 Jan 2026 20:12:07 -1000 Subject: Add Shopping tab combining Trello and PlanToEat lists - New Shopping tab aggregates items from Trello Shopping board and PlanToEat - Items grouped by store, then by category (for PlanToEat) - Trello list names treated as store names - Replace PlanToEat meals API with web scraping (uses session cookie) - Add error logging for PlanToEat fetch operations - Recipe links now point to cooking view (/recipes/{id}/cook/{event_id}) Co-Authored-By: Claude Opus 4.5 --- cmd/dashboard/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 8716db9..ce447ff 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -84,7 +84,11 @@ func main() { var planToEatClient api.PlanToEatAPI if cfg.HasPlanToEat() { - planToEatClient = api.NewPlanToEatClient(cfg.PlanToEatAPIKey) + pteClient := api.NewPlanToEatClient(cfg.PlanToEatAPIKey) + if cfg.PlanToEatSession != "" { + pteClient.SetSessionCookie(cfg.PlanToEatSession) + } + planToEatClient = pteClient } var googleCalendarClient api.GoogleCalendarAPI @@ -130,11 +134,14 @@ func main() { r.Get("/api/tasks", h.HandleGetTasks) r.Get("/api/meals", h.HandleGetMeals) r.Get("/api/boards", h.HandleGetBoards) + r.Get("/api/shopping", h.HandleGetShoppingList) // Tab routes for HTMX r.Get("/tabs/tasks", h.HandleTabTasks) r.Get("/tabs/planning", h.HandleTabPlanning) r.Get("/tabs/meals", h.HandleTabMeals) + r.Get("/tabs/timeline", h.HandleTimeline) + r.Get("/tabs/shopping", h.HandleTabShopping) r.Post("/tabs/refresh", h.HandleRefreshTab) // Trello card operations -- cgit v1.2.3