Open simonw opened 4 years ago
>>> def ext_counts(directory):
... counts = {}
... for path in pathlib.Path(directory).glob("**/*"):
... ext = path.suffix
... counts[ext] = counts.get(ext, 0) + 1
... return counts
...
>>>
>>> ext_counts("/Users/simon/Pictures/Photos Library.photoslibrary/originals")
{'': 16, '.heic': 15478, '.jpeg': 21691, '.mov': 946, '.png': 2262, '.gif': 38, '.mp4': 116, '.aae': 2}
I'm going to leave this until I have the mechanism for associating a live photo video with the photo.
The
upload
command currently only handles static images:https://github.com/dogsheep/photos-to-sqlite/blob/d939455af00e07866686457ee2fcb9b2d1b7194e/photos_to_sqlite/utils.py#L26-L33
Need to cover movies taken by my phone and DSLR too.