Extract photos from an album in Photos.app and package it up to display on my website
Python 100.0%
Other 0.1%
14 2 0

Clone this repository

https://tangled.org/ericwood.org/photo-album-extractor https://tangled.org/did:plc:lpbmjj433fvqc52btufklfjc/photo-album-extractor
git@knot.tangled.wizardry.systems:ericwood.org/photo-album-extractor git@knot.tangled.wizardry.systems:did:plc:lpbmjj433fvqc52btufklfjc/photo-album-extractor

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

photo-album-extractor#

This is a tool for extracting photos from Photos.app in a specific album and exporting a bundle for use in a photo gallery on my website.

I want to share my photos with other people, but want to manage that all in the main app I use for my photos.

The tool is intended to be idempotent, and the output should be kept around between runs to avoid unnecessary operations. For best results, run on a cron or with launchd on a regular basis.

Features#

Tagging#

Photos.app has a tagging feature, which we utilize to pull tags for each photo. Tags are stored as a separate table and joined to each photo, which makes it easy to query by tag.

People/pets#

Using metadata Photos.app keeps on detected people/pets, I'm automatically tagging photos of my family.

This is hard-coded because I don't want to define a config file.

Output#

The following is generated when run:

  • Full resolution exports of each image
  • Thumbnails for each image (resized and converted to webp)
  • A SQLite DB with metadata for each image

Future work#

The following are possible, but not implemented yet:

  • Strip location exif data (I'm never using iPhone photos so this isn't an issue for now)
  • Automatic tagging using Photos.app search (could be slow?)