Screenshot Holmes
Sometimes you have to be Sherlock Holmes to find that screenshot you just took. Enter Screenshot Holmes, your digital detective for image organization.
Introduction
Screenshot Holmes is a Python-based tool designed to bring order to the chaos of your screenshot collection. Just as the famous detective could deduce a person's life story from a mere glance, our tool analyzes your images to understand their content, helping you locate and organize your visual information with unprecedented ease.
What does Screenshot Holmes do?
Our digital detective employs state-of-the-art AI to investigate your screenshots:
- Analyze: Uses advanced image recognition to understand the content of each screenshot.
- Rename: Generates descriptive filenames based on the image content, making it easier to find what you need.
- Organize: Adds relevant metadata to each file, enhancing searchability and organization.
- Deduce: Helps you quickly locate specific screenshots based on their content, not just when they were taken.
Example:
Let's say you've taken a screenshot of movie showtimes:
Before: Screenshot 2024-09-10 at 7.16.29 PM.png
After: Beetlejuice_PG-13_1h44m_Showtimes_4DX_IMAX_RPX_Standard.png
Screenshot Holmes analyzes the image and renames it based on the key information:
- Movie title: Beetlejuice
- Rating: PG-13
- Duration: 1 hour 44 minutes
- Content type: Showtimes
- Viewing formats: 4DX, IMAX, RPX, Standard
This descriptive filename makes it much easier to find this specific screenshot later, whether you're searching for "Beetlejuice showtimes" or "IMAX movies".
Prerequisites
Before you begin, ensure you have met the following requirements:
- Python 3.7 or higher
- An OpenAI API key with access to the GPT-4 Vision API
Installation
-
Clone this repository:
git clone https://github.com/yourusername/screenshot-organizer.git cd screenshot-organizer -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required packages:
pip install openai python-dotenv Pillow
Configuration
- Create a
.envfile in the project root directory. - Add your OpenAI API key to the
.envfile:OPENAI_API_KEY=your_api_key_here
Usage
-
Open the
app.pyfile and set thefolder_pathvariable to the directory containing your screenshots. -
Run the script:
The script will process all PNG files in the specified folder that have "screenshot" in their filename. It will analyze each image, generate a new name, add metadata, and rename the file.
Customization
You can modify the process_screenshots function in app.py to change the file selection criteria or add support for additional file formats.
Contributing
Contributions to this project are welcome. Please feel free to submit a Pull Request.
License
This project is open source and available under the MIT License.
Contact
If you have any questions or feedback, please contact [chris.jaynes@gmail.com] or submit a pr.

