|
|
|
|
@ -41,6 +41,7 @@ def process_pictures(source: str, dest_shrunk: str, dest_original: str):
|
|
|
|
|
# Q: do we strip exif from originals?
|
|
|
|
|
move(path.join(root, filename), dest_original)
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
# return the freshly processed picture info
|
|
|
|
|
yield {
|
|
|
|
|
"ResizedImage": path.join(dest_shrunk, filename),
|
|
|
|
|
@ -51,6 +52,9 @@ def process_pictures(source: str, dest_shrunk: str, dest_original: str):
|
|
|
|
|
"GPSLongitude": exif["GPSLongitude"],
|
|
|
|
|
"GPSLongitudeRef": exif["GPSLongitudeRef"],
|
|
|
|
|
}
|
|
|
|
|
except KeyError as e:
|
|
|
|
|
print(f"Image '{filename}' has no valid exif")
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def update_database(pic_info: dict, db_location: str):
|
|
|
|
|
|