You are browsing as a guest. Sign up (or log in) to start making projects!

Creating Library for Family Photos

  • 1 Devlogs
  • 1 Total hours

Creating scripts to sort my wide variety of family photos and label them.

Ship #1 Changes requested

Scripts for organizing family photo collections into a clean, date-based directory structure.

Scripts
create_photo_dirs.sh
Creates a Year/Month folder tree for a given date range.

./create_photo_dirs.sh [root_dir] [start_year] [end_year]

# Example: create folders from 2005 to 2024 under ~/Photos
./create_photo_dirs.sh ~/Photos 2005 2024
Output structure:

~/Photos/
2005/
01_January/
02_February/
...
2006/
...
rename_photos.py
Renames photos in a folder to a consistent YYYY-MM-DD_HHMMSS_originalname.ext format. Uses EXIF DateTimeOriginal when available, falls back to file modification time.

# Preview changes without renaming
python rename_photos.py ~/Photos/unsorted --dry-run

# Rename for real
python rename_photos.py ~/Photos/unsorted
sort_photos_into_dirs.py
Moves (or copies) photos from a flat folder into a Year/Month directory tree automatically.

# Preview
python sort_photos_into_dirs.py ~/Downloads/OldPhotos ~/Photos --dry-run

# Move files
python sort_photos_into_dirs.py ~/Downloads/OldPhotos ~/Photos

# Copy instead of move
python sort_photos_into_dirs.py ~/Downloads/OldPhotos ~/Photos --copy
Requirements
pip install Pillow
Pillow is used to read EXIF data for accurate photo dates. If not installed, all scripts fall back to file modification time.

Typical Workflow
Run create_photo_dirs.sh to build the folder structure.
Run rename_photos.py on your unsorted folder to standardize filenames.
Run sort_photos_into_dirs.py to move everything into the right Year/Month folder.

  • 1 devlog
  • 1h
Try project → See source code →

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…