Switch menu source from Nutrislice to Claude-read PDF, weekly to monthly pull
All checks were successful
Deploy / deploy (push) Successful in 35s

The district discontinued Nutrislice in favor of a monthly PDF calendar
per grade band on kyrene.org. That PDF is a graphic calendar grid, not
reliably text-extractable, so scraper.py now sends it to Claude (vision +
structured JSON output) instead of hitting a JSON API. Fetches through a
stable Finalsite resource-manager permalink that always redirects to
whichever month is currently published, so no code change is needed each
month.

Also moves the pull schedule from weekly (day-of-week list) to monthly
(day-of-month), since the source itself is now monthly — defaults to the
25th, since the district tends to post next month's PDF a few days early.

Requires a new ANTHROPIC_API_KEY in the server's .env.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013RbBoYm23muVyMZ18Ldqa6
This commit is contained in:
Barely Removable 2026-09-08 07:12:34 -07:00
parent 1bc07a7ad0
commit a809aa5a5a
5 changed files with 263 additions and 163 deletions

View file

@ -6,12 +6,17 @@
# e.g. http://192.168.86.X:8123/api/webhook/<random-token>
HA_WEBHOOK_URL=
# Anthropic API key. The district's lunch menu is now a graphic PDF
# calendar (Nutrislice was discontinued), so scraper.py sends it to Claude
# to read into structured data — see console.anthropic.com/settings/keys.
ANTHROPIC_API_KEY=
# --- Optional ---
# Day(s) of week to pull the upcoming school week and push it to the
# calendar (comma-separated: mon,tue,wed,thu,fri,sat,sun). Picking more
# than one day creates duplicate events for days already pushed — most
# people want just one.
CALENDAR_RUN_DAYS=sun
# Day of the month (1-28) to pull whichever month is currently published
# and push it to the calendar. Re-pushing the same month creates duplicate
# events, so pick one day near month-end (the district tends to post next
# month's menu a few days early).
CALENDAR_RUN_DAY_OF_MONTH=25
# Time to run the pull (24-hour HH:MM, container timezone)
CALENDAR_RUN_TIME=18:00