ð« The Pain Point
Your camera names photos IMG_0001.jpg, IMG_0002.jpg⊠You want them named by date: 2024-01-15_143052.jpg for chronological sorting.
ð Agentic Solution
An EXIF-Based Renamer that uses photo metadata for meaningful names.
Key Features:
- Date Extraction: Uses DateTimeOriginal from EXIF.
- Custom Patterns:
{year}-{month}-{day}_{hour}{minute}{second}. - Duplicate Handling: Adds suffix for same-second photos.
âïž Phase 1: Commander (Quick Fix)
For quick renaming.
Prompt:
âI have a folder
photoswith images. Write a Python script using Pillow to:
- Read EXIF: Extract DateTimeOriginal from each image.
- Rename: To format
YYYY-MM-DD_HHMMSS.jpg.- Duplicates: Add suffix
_1,_2if same timestamp.- No EXIF: Use file creation date as fallback.
Preview renames first, apply with
--applyflag.â
Result: Chronologically organized photo library.
ðïž Phase 2: Architect (Permanent Tool)
For Photographers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "EXIF Renamer" Desktop App
**Objective:** A desktop utility to batch rename photos based on their internal metadata (Date Taken).
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Metadata: Pillow, piexif
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Folder:** Source Folder Selection.
* **Pattern:** Input field for renaming pattern (e.g., `{year}-{month}-{day}_{seq}`).
* **Table:** `QTableWidget` showing "Current Name" vs "New Name" preview.
* **Actions:** "Scan" to preview, "Apply" to rename.
2. **Core Logic:**
* Safely extract `DateTimeOriginal`.
* Handle duplicates by adding incremental suffix (`_1`, `_2`).
* **Threading:** fast scanning of thousands of files.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
ð§ Prompt Decoding
- DateTimeOriginal: The timestamp when the photo was actually taken, not when the file was copied.
ð ïž Instructions
- Install:
pip install pillow piexif - Copy Prompt â Preview â Apply.