This Python script is designed for Sony photographers who shoot in RAW + JPEG formats. It helps you easily find and transfer all 5-star rated RAW images from your camera to a designated folder. This tool is especially useful for streamlining your post-shoot workflow.
Compatibility: Tested on MacBook M2 and MacBook Intel.
If you find this script useful, please consider starring this repository and sharing it with your community!
-
Download the Repository
- Look for the green
Code
button near the top of the page. - Click on the
Code
button, and then selectDownload ZIP
from the dropdown menu. - Once the ZIP file is downloaded, extract it to a desired location on your device. The
main.py
file is inside the extracted folder.
- Look for the green
-
Prepare Your Environment
- Open the Terminal and navigate to the folder containing
main.py
:cd path/to/folder
- If it's your first time running this script, install required dependencies:
pip install -r requirements.txt #or: pip3 install -r requirements.txt
- Open the Terminal and navigate to the folder containing
-
Run the Script
- Execute
main.py
using the following command:python3 main.py
- Execute
-
Specify Directories
- Enter the pathname of the source directory (e.g.,
/Volume/SD/DCIM/100MSDCF
). - Enter the pathname of the destination directory (e.g.,
/Desktop/output
). - Would you like to pick a specific date? (e.g.,
Yes
). - If yes, pick the desired date (eg.
2000-12-31
)
- Enter the pathname of the source directory (e.g.,
Q: How do I find the pathname on MacOS? A: You can find instructions on how to locate a pathname on MacOS here.
Dependencies: PIL
for image handling, os
for file management, shutil
for file transfer, and defusedxml
to prevent any potentially malicious operation.
Functionality:
- The script scans the specified folder for JPEG images.
- It checks each image's metadata for a 5-star rating.
- If a 5-star JPEG is found, the script locates its RAW counterpart.
- The RAW images are then copied to the designated output folder.