This script automates the process of importing photos from a source location (typically a camera SD card) to a destination directory. It preserves metadata and offers several helpful features:
- Copies photos while preserving file timestamps and permissions
- Filters by file date (only copy files newer than a specified date)
- Adds lens model and copyright information to EXIF metadata
- Geotags photos using GPX track files
- Handles various image formats (both standard and RAW formats)
- Prevents duplicate copies by checking file sizes
- Reports processing time
It's particularly useful for photographers who want to streamline their workflow when importing photos from memory cards while automatically adding metadata and geographic information to their images.
cpmyphotos -C 'MYNAME' -L '7Artisans 35mm f/0.95' -s /run/media/${USER}/LUMIX1/DCIM/109_PANA -d /home/ftp/images/$(date '+%Y')/lev1/lev2/ -n '1 day ago' -g ~/SyncPhone/gpslog/$(date '+%Y%m%d').gpx --tz '+02:00:00'
This script restores EXIF metadata from original source images to their processed exports. It's designed for photographers who use Darktable with other tools where the exported JPG files may lose important metadata during processing.
- When run on a processed image in a
darktable_exported
folder, it locates the original source file (RAW or JPG) in the parent directory - Extracts key EXIF metadata (exposure, camera, lens, GPS data, dates, etc.) from the source file
- Applies this metadata to the processed image, preserving important photographic information
/photos/ <- Source directory with RAW/original files
IMG_1234.RAW <- Original with complete metadata
/darktable_exported/ <- Export directory
IMG_1234_pp.jpg <- Processed image with lost metadata
Run the script on the processed image:
./myexif.py /photos/darktable_exported/IMG_1234_pp.jpg
The script automatically finds the source image, extracts key metadata, and restores it to the processed version.