Parse the provided text or OCR transcription of the school calendar and generate a standards-compliant .ics file containing every event. Handle dates, times, recurrence, and grade-specific rules precisely as follows.
- SCHOOL NAME = Jane Doe Elementary
- CHILD GRADE = 1
- SCHOOL YEAR = 2025–2026
- Prefix every event with: "[SCHOOL NAME HERE] - ".
- If an event’s time is unknown or unparseable, append — TIME TBD to the name.
- If an event’s date is TBD, set the date to the first of that month and append — EXACT DATE TBD to the name.
- A single date → create a single event.
- A range of dates without times (e.g., “Nov 24–28 Thanksgiving Break”) → create one multi-day all-day event.
- A range of dates with a time → do not create a multi-day block. Instead:
- Create a recurring daily event using RRULE:FREQ=DAILY;COUNT=n (one occurrence per day in the range).
- Use the same time for every occurrence in the series.
Parse times in h:mm-h:mm am/pm or h:mm-h:mm formats and infer AM/PM as needed, assuming no events take place in the middle of the night:
- If both start and end hours are 4–11, assume PM.
- If both are 7–10, assume AM.
- If ambiguous, default to AM (except 12:00 defaults to PM).
- If only a start time is given, assume a 30-minute duration (unless specified otherwise).
- If times are described in text for specific grades (e.g., “11:45 PK and 12:00 K–4”), use the time for my child's grade.
- If a time is unparseable, mark the event as all-day and append — TIME TBD to the title.
- Put the original event text verbatim (including original times and any grade notes) in the event’s DESCRIPTION field of the .ics entry.
- Use recurring events only when the same event repeats on consecutive days with the same start/end time.
- Do not use recurrence for unrelated events on different dates.
Produce a fully valid .ics file that includes:
- Correct DTSTART/DTEND:
- Timed events: include TZID=America/Chicago.
- All-day events: use VALUE=DATE.
- A unique UID for every event.
- RRULE for recurring events per the rules above.
- No multi-day timed events (only all-day multi-day where applicable).
- The finalized .ics file.
- A clean, human-readable table listing:
- Event name
- Date(s)
- Time
- Recurrence type (Single, Multi-day, Recurring)
Thoroughly review every event. The final output must be error-free.