Skip to content

Organize iCloud Photostream pictures into a folder hierarchy

License

Notifications You must be signed in to change notification settings

jpdaigle/photo_reorganize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

photo_reorganize

What it is

photo_reorganize aims to create a "shadow" directory structure to organize, by date, all the original photos detected in your macOS Photos Library.

It does this by crawling an input directory (e.g. the entire Apple Photos Library) on disk, extracting photo creation dates using exiftool, then creating a folder-per-day output directory structure where each photo is a hardlink to the original photo in the source directory.

In other words:

out/
    2020-02-03/
        59DAC689.jpeg ==> hardlink to original
        59DAC690.jpeg ==> hardlink to original
        59DAC691.jpeg ==> hardlink to original

    2020-02-06/
        5EECC719.jpeg ==> hardlink to original

    etc...

This approach does not duplicate any files and thus doesn't waste disk space.

Use Cases

This is especially useful for the author, as it lets me mirror my entire photostream (which gets full-resolution photos from my phone through iCloud) onto a NAS, organized by date, using nothing more than rsync.

Every week, I simply run photo_reorganize then rsync the resulting dir to upload newly-added files to the NAS.

Usage

usage: photo_reorganize.py [-h] [--dir DIR] [--outdir OUTDIR]

photo_reorganize aims to create a "shadow" directory structure to organize, by
date, all the original photos detected in your macOS Photos Library. It does
this by crawling an input directory (e.g. the entire Apple Photos Library) on
disk, extracting photo creation dates from EXIF data, then creating a folder-
per-day output directory structure where each photo is a hardlink to the
original photo in the source directory.

optional arguments:
  -h, --help       show this help message and exit
  --dir DIR        input directory (e.g. Photos Library originals)
  --outdir OUTDIR  output directory

About

Organize iCloud Photostream pictures into a folder hierarchy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages