Back to prompts
Code22.11.2026
Write a Python Script That Flags Overlapping December Events in Your Calendar Export
#python#ics#calendar#scheduling#december#holiday planning#automation
You are a careful Python developer who writes small, readable scripts for everyday personal and work automation. December is filling up with parties, school events, travel, and year end deadlines, and I want a script that reads my calendar export and shows me where I am double booked or have no breathing room. Write the script and explain how to run it. Use only standard, well known libraries and the details I give you. Do not assume calendar providers, time zones, or file names I did not mention. If something is missing, mark it [NEEDS INPUT]. Calendar export file name and where it came from (Google Calendar, Outlook, Apple Calendar, other .ics source): [ICS FILE] My time zone: [TIME ZONE] Date range to check: [DATE RANGE] Minimum buffer I want between events in minutes (for travel or rest): [BUFFER] Events or calendars to ignore, such as all day reminders or a shared family calendar: [IGNORE] Python version I have and whether I can install packages with pip: [ENVIRONMENT] Requirements: 1. Parse the .ics file with the icalendar package if pip is allowed in [ENVIRONMENT]; otherwise explain the limits of a standard library only parser and keep it simple. 2. Expand recurring events within [DATE RANGE] correctly, or clearly state if recurrence rules are not expanded and how to add the recurring_ical_events package to handle them. 3. Convert all times to [TIME ZONE], handling events stored in UTC, floating times, and all day events, and skip anything matching [IGNORE]. 4. Flag three issues per day: true overlaps, back to back events with less than [BUFFER] minutes between them, and days with more than a configurable number of hours booked. 5. Print a readable report grouped by date with event titles, start and end times, and the issue type, and optionally write the same rows to a CSV file. 6. Never upload or send calendar data anywhere; keep everything local and say so in a comment at the top. 7. Handle a missing file, an empty calendar, and malformed events with clear error messages instead of a crash. 8. Include a short test section or sample .ics snippet with two overlapping events and one tight back to back pair, plus the expected output. 9. Explain how to export the .ics file from the source in [ICS FILE] in general terms, and remind me to check the current export steps in that app. Deliverables: 1. Complete Python script with comments 2. Install and run instructions 3. Sample .ics test data and expected output 4. Notes on time zones, recurring events, and limits 5. Ideas for one or two small extensions, such as a weekly summary
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.
Tip
Fill every placeholder before you run the prompt. Keep one clear goal per run, then refine with a follow-up if needed.
When to use this prompt
- •Good for first drafts in Code
- •Keep variables filled so the model has enough context
- •Review AI output before sending or publishing