😫 The Pain Point
After a trip, you have 500 photos from an iPhone (IMG_1023.JPG) and 300 from a Canon camera (DSC_9912.JPG). Merging them into one folder results in a mess because the filenames don’t align. You want to sort them by chronological order.
🚀 Agentic Solution
Timeline Sorter: Reads the hidden Date Taken and renames the file.
Key Features:
- Consistent Naming:
2023-10-20_09-30-00.jpg. Sorting by name now equals sorting by time. - Conflict Fix: If 10 photos were taken in the same second, it appends
_01,_02.
⚔️ Phase 1: Commander (Quick Fix)
For organizing personal photos.
Prompt:
“Rename all images in this folder to the format ‘YYYY-MM-DD_HH-MM-SS.jpg’ based on their Exif ‘DateTimeOriginal’. Use Python.”
Result: A script that standardizes filenames.
🏗️ Phase 2: Architect (Permanent Tool)
For Photographers/Archivists.
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create a "Photo Organizer & Renamer".
**Requirements:**
1. **GUI:**
* Select Source Folder.
* Input Name Format (e.g., `%Y-%m-%d_%H%M%S`).
* "Rename" button.
2. **Logic:**
* Read EXIF data using `Pillow` (get_exif).
* Extract 'DateTimeOriginal'.
* Handle duplicates (check if filename exists, if so append counter _1, _2).
* Rename file securely.
3. **Deliverables:** `exif_rename.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Duplicate Handling: High-end cameras can shoot 10 frames per second. If the code doesn’t handle name conflicts, the subsequent 9 photos would overwrite the first one, leading to data loss.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Select Folder -> Start.