smart_renamer.mp4
Smart Renamer automatically organizes and renames macOS screenshots using Automator and OpenAI's GPT-4 Vision API. It detects new screenshots, analyzes content to create descriptive filenames, renames them, and logs each to avoid reprocessing.
- Locate Screenshots: Finds the most recent screenshot in a specified directory.
- Analyze Content: Uses AI to generate a concise description of the screenshot.
- Rename and Log: Renames screenshots based on AI-generated descriptions and logs them.
echo "export OPENAI_API_KEY='your-api-key'" >> ~/.zshrc
source ~/.zshrc
git clone https://github.com/syedamaann/smart_renamer.git
cd smart_renamer
Edit smart_renamer.py
and update the DIRS
array with paths to your screenshot directory and log file.
Open Automator, select "Folder Action" and the screenshot directory. Add "Run Shell Script" with the command:
source ~/.zshrc
python3 /path/to/smart_renamer/smart_renamer.py
Replace /path/to/smart_renamer/
with the actual script path and save the action as "RenameScreenshots".
Take a screenshot to see if it automatically renames based on the content.
- API Key: Ensure your OPENAI API Key is correctly set in
.zshrc
. - Paths and Permissions: Check the paths in Automator and ensure the script has execution permissions.