Updated ReadMe for everything that has changed.

This commit is contained in:
2026-02-24 22:07:33 -08:00
parent fe07a23a2f
commit 8ded70b743

View File

@@ -16,6 +16,7 @@ Each couple gets their own set of interest checkboxes ("His Picks" / "Her Picks"
- **Interest filter** — narrow the list to His Picks, Her Picks, Both Picked, or Either Picked
- **Random picker** — "Pick for Us!" draws a random winner from the currently filtered pool, with an option to re-roll
- **Course browse** — dedicated First Course, Second Course, and Third Course buttons open a modal listing every dish for that course across all restaurants; click any dish to jump straight to that restaurant's detail view
- **Year selector** — dropdown on the course browse bar switches between available event years (2025, 2026); restaurant data, filters, and interest picks are all scoped to the selected year
- **Clear Filters** — one-click button to reset all search and filter fields back to their defaults
- **Reset Selected** — clears all saved picks (with a confirmation prompt) so you can start fresh
- **Mobile-friendly** — responsive single-panel layout on small screens; the list and detail views swap in place, with a Back button to return to the list
@@ -23,7 +24,7 @@ Each couple gets their own set of interest checkboxes ("His Picks" / "Her Picks"
## Usage
1. Serve the folder from a web server and open `restaurant-picker.html` in a browser. (The app fetches `2026-restaurants.json` at runtime, so it cannot be opened directly as a local `file://` URL — a server is required. A simple option is the VS Code Live Server extension, or `npx serve .` in the project folder.)
1. Serve the folder from a web server and open `restaurant-picker.html` in a browser. (The app fetches a `YYYY-restaurants.json` file at runtime, so it cannot be opened directly as a local `file://` URL — a server is required. A simple option is the VS Code Live Server extension, or `npx serve .` in the project folder.)
2. Browse the restaurant list or use the toolbar filters to narrow choices.
3. Use the **First Course**, **Second Course**, or **Third Course** buttons to browse all dishes for a given course and jump to any restaurant that interests you.
4. Check the **You** and **Wife** boxes on any restaurant you're each interested in.
@@ -45,12 +46,25 @@ Each couple gets their own set of interest checkboxes ("His Picks" / "Her Picks"
```
restaurant-picker.html # App shell — HTML, CSS, and JS logic
2026-restaurants.json # Restaurant data for the 2026 event (loaded at runtime via fetch)
2026-restaurants.json # Restaurant + event date data for the 2026 event
2025-restaurants.json # Restaurant + event date data for the 2025 event
LICENSE
README.md
```
Each year, create a new `YYYY-restaurants.json` and update the filename in the `fetch()` call near the bottom of `restaurant-picker.html`.
### Adding a New Year
1. Create a new `YYYY-restaurants.json` file following the schema described below (see [Data Entry Guide](#data-entry-guide)).
2. In `restaurant-picker.html`, add a new `<option>` to the year selector dropdown:
```html
<select id="yearSelect" onchange="loadYear(this.value)">
<option value="2027">2027</option> <!-- add new year at top -->
<option value="2026">2026</option>
<option value="2025">2025</option>
</select>
```
3. Update the hardcoded default in the `loadYear('2026')` init call at the bottom of the `<script>` block to the new year.
4. Update the static fallback date in the `<span id="eventDates">` header element — it will be overwritten at runtime, but the static value is shown briefly on first load.
---
@@ -58,6 +72,20 @@ Each year, create a new `YYYY-restaurants.json` and update the filename in the `
Each year's restaurant data is stored as a JSON file (`YYYY-restaurants.json`) loaded by `restaurant-picker.html` at runtime. The source data comes from the [IRW restaurant listing pages](https://inlanderrestaurantweek.com/restaurants/). This section covers the data schema and common pitfalls to avoid when entering or updating restaurant records.
### File-Level Schema
Each `YYYY-restaurants.json` is an **object** (not a bare array) with two top-level keys:
```json
{
"eventDates": "FEBRUARY 26 MARCH 7, 2026",
"restaurants": [ ... ]
}
```
- `eventDates` — the display string shown in the header when that year is selected; use an em dash (``) between the start and end dates
- `restaurants` — array of restaurant objects (see schema below)
### Restaurant Object Schema
```json
@@ -179,7 +207,9 @@ Run the following Python script against the JSON file to identify any restaurant
import json
with open('2026-restaurants.json', encoding='utf-8') as f:
restaurants = json.load(f)
data = json.load(f)
restaurants = data['restaurants']
for r in restaurants:
name = r.get('name', 'Unknown')