pynamer/memory-bank/projectbrief.md

19 lines
953 B
Markdown

# Project Brief: PyNamer
**Goal:** Enhance the `pynamer` tool to improve efficiency and potentially reduce costs by normalizing image sizes before submitting them to a Large Language Model (LLM) for filename generation.
**Core Functionality:**
- Takes one or more image file paths as input.
- Reads configuration from `config.yaml`.
- Resizes images exceeding a configured maximum dimension while maintaining aspect ratio.
- Encodes the (potentially resized) image to base64.
- Sends the image data and configured prompts to an LLM (via `litellm`).
- Receives a descriptive filename suggestion from the LLM.
- Cleans the suggested filename (snake_case, alphanumeric).
- Renames the original image file with the new filename.
- Supports dry-run mode.
**Enhancement:**
- Added image resizing using the Pillow library before encoding and sending to the LLM.
- Introduced configuration options (`resize_max_dimension`, `resize_format`) in `config.yaml`.