diff --git a/util/import_photos.py b/util/import_photos.py index d5ce5cf..231e45c 100644 --- a/util/import_photos.py +++ b/util/import_photos.py @@ -52,8 +52,16 @@ def process_pictures(): # Q: do we strip exif from originals? move(path.join(root, filename), DEST_ORIGINAL) - # update the database - pass + # return the freshly processed picture info + yield { + "ResizedImage": path.join(DEST_STRUNK, filename), + "OriginalImage": path.join(DEST_ORIGINAL, filename), + "DateTimeOriginal": exif["DateTimeOriginal"], # Q: normalize it? + "GPSLatitude": exif["GPSLatitude"], + "GPSLatitudeRef": exif["GPSLatitudeRef"], + "GPSLongitude": exif["GPSLongitude"], + "GPSLongitudeRef": exif["GPSLongitudeRef"], + } def update_database(): @@ -80,6 +88,8 @@ def main(): exit(1) # process each pic and add it to the database + for pic in process_pictures(): + print(pic) # just print into strout for now if __name__ == "__main__":