From d577396768bf930cba5417fb9010c836ee20f31d Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 12 Aug 2022 22:37:09 +0200 Subject: [PATCH] add: copy date metadata --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 254c5db..249f18f 100644 --- a/main.py +++ b/main.py @@ -18,7 +18,7 @@ names = ['A', 'B', 'C'] delete_original: bool = True # deletes the original image after blurring image was created copy_metadata_gps: bool = True # copies gps location from original to blurred image -copy_metadata_timestamp: bool = True # TODO: copies timestamp from original to blurred image +copy_metadata_date: bool = True # copies date from original to blurred image # Lower-case image extensions. image_extensions = ['.jpg', '.jpeg', '.png'] @@ -70,9 +70,9 @@ def main(): if blurred_img is not None and copy_metadata_gps: print(f' Copying gps metadata to blurred file ...') exec.execute_save(['exiftool', '-tagsfromfile', str(file), '-gps:all', str(blurred_img)]) - if blurred_img is not None and copy_metadata_timestamp: - # TODO - pass + if blurred_img is not None and copy_metadata_date: + print(f' Copying date metadata to blurred file ...') + exec.execute_save(['exiftool', '-tagsfromfile', str(file), '-alldates', str(blurred_img)]) if blurred_img is not None and delete_original: print(f' Deleting original file ...') file.unlink()