Skip to content

Create albums for top 10 unnamed persons #1487

Answered by RhetTbull
jefgoi asked this question in Q&A
Discussion options

You must be logged in to vote

I decided this might actually be useful for me too so I whipped up a script that will find the top 10 unnamed faces and add them to albums automatically:

"""Find top 10 unnamed faces in Photos library and add them to albums."""

from osxphotos import PhotosDB
from osxphotos._constants import _UNKNOWN_PERSON
from osxphotos.photosalbum import PhotosAlbum


def get_person_photos(person_info):
    """Workaround for bug #1489 in osxphotos, will be fixed in next release"""
    try:
        return person_info.photos
    except KeyError:
        return []


def main():
    """Find top 10 unnamed faces in Photos library and add them to albums."""
    photosdb = PhotosDB(verbose=print)
    unnamed_…

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@RhetTbull
Comment options

@RhetTbull
Comment options

@RhetTbull
Comment options

@RhetTbull
Comment options

Answer selected by jefgoi
@jefgoi
Comment options

@Conzpiral
Comment options

@RhetTbull
Comment options

@Conzpiral
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants