From 0bce333173afcb294bf4f7c3d0b8d164305a516f Mon Sep 17 00:00:00 2001 From: andrearuffini Date: Wed, 4 Nov 2026 16:18:32 +0100 Subject: [PATCH] chore: first opening-hours snapshot from Google Co-Authored-By: Claude Opus 5.5 --- docs/handoffs/2026-11-04-orari-google.md | 9 ++- src/data/orari-google.json | 80 ++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 src/data/orari-google.json diff --git a/docs/handoffs/2026-11-04-orari-google.md b/docs/handoffs/2026-11-04-orari-google.md index 6fbb9ea..372252f 100644 --- a/docs/handoffs/2026-11-04-orari-google.md +++ b/docs/handoffs/2026-11-04-orari-google.md @@ -7,7 +7,7 @@ None (explicit user instruction: read opening hours from the Google Business Pro Make Google Business Profile the single source of opening hours. ## Status -in-progress — code done; waiting for the API key in `.env.server` to look up the Place ID, take the first snapshot and deploy +done — live on https://officinezuliani.a75.eu ## What changed - `scripts/orari-google.mjs` (Places API → site format; `--cerca` to find the Place ID) @@ -19,11 +19,14 @@ in-progress — code done; waiting for the API key in `.env.server` to look up t ## Tests - Run: script with a stubbed Places response (regular hours + holiday + half day) → correct `settimana` / `prossimiGiorni` - Run: Insegna with a test `/dati/orari.json` (today closed) → "Chiuso ora · Riapriamo venerdì alle 8:00"; without file → build hours -- Not run: real Places API call (no key yet), server container +- Run: real Places API — Place ID `ChIJCY2DP7HKe0cR5gsnqt1z9aU` (Officine Zuliani E. di Peresani A. Tosoni B. & C. S.A.S., Viale Venezia 446); snapshot committed +- Run: deploy — containers `officinezuliani-site` and `officinezuliani-orari` up; `/dati/orari.json` served (no-cache, noindex); live sign shows "Aperto ora · Chiudiamo alle 19:00" ## Risks / open questions +- Google says Mon–Fri 8:00–12:00 / 14:00–19:00; the old site said 18:30. The site now follows Google: client to confirm the listing is right +- Saturday: closed on Google - Billing account required on Google Cloud; check free usage on the current price list - Restrict the key to Places API (New) only ## Suggested next step -- Fill `.env.server`, run `--cerca`, set `GOOGLE_PLACE_ID`, `./deploy.sh`, commit the snapshot +- Phase 2 content (service pages, FAQ page); contact form decision diff --git a/src/data/orari-google.json b/src/data/orari-google.json new file mode 100644 index 0000000..82fbf4e --- /dev/null +++ b/src/data/orari-google.json @@ -0,0 +1,80 @@ +{ + "fonte": "google", + "aggiornato": "2026-11-04T15:14:44.384Z", + "statoAttivita": "OPERATIONAL", + "settimana": [ + { + "giorni": [ + 1, + 2, + 3, + 4, + 5 + ], + "fasce": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ] + } + ], + "prossimiGiorni": { + "2026-11-04": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ], + "2026-11-05": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ], + "2026-11-06": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ], + "2026-11-07": [], + "2026-11-08": [], + "2026-11-09": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ], + "2026-11-10": [ + [ + 480, + 720 + ], + [ + 840, + 1140 + ] + ] + } +}