From 95a264f9cad18a2e67d7e243c32b0c5877580749 Mon Sep 17 00:00:00 2001 From: Ralf Bell Date: Fri, 31 May 2019 14:52:32 +0200 Subject: [PATCH 1/3] Bugfix --- .gitignore | 3 +++ __pycache__/.gitignore | 1 + exif_extractor.py | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 __pycache__/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e94aa6d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.project +/.pydevproject +/IMG_2444.JPG.txt diff --git a/__pycache__/.gitignore b/__pycache__/.gitignore new file mode 100644 index 0000000..7fd6357 --- /dev/null +++ b/__pycache__/.gitignore @@ -0,0 +1 @@ +/common_methods.cpython-37.pyc diff --git a/exif_extractor.py b/exif_extractor.py index 6bbf2bb..234c4bd 100644 --- a/exif_extractor.py +++ b/exif_extractor.py @@ -2,13 +2,17 @@ import sys, os, optparse from PIL import Image from PIL.ExifTags import TAGS -from common_tools import * +from common_methods import * +from datetime import datetime def getExif(image_file, save=True, verbose=True): '''Get image file EXIF metadata''' if not os.path.isfile(image_file): sys.exit("%s is not a valid image file!") + + name = getFileName(image_file) + now = datetime.now() data = "Time: %d/%d/%d %d : %d : %d. Found the following Exif data for the image %s:\n\n" % (now.year, now.month, now.day, now.hour, now.minute, now.second, name) @@ -32,7 +36,6 @@ def getExif(image_file, save=True, verbose=True): data += "{} : {}\n".format(key, exif_data[key]) if save: - name = getFileName(image_file) tgt = name + ".txt" saveResult(tgt, data) From 47c123ceb67e75ef2bb973465baf7c90e6d9cf31 Mon Sep 17 00:00:00 2001 From: rabede Date: Fri, 31 May 2019 15:09:23 +0200 Subject: [PATCH 2/3] Delete .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e94aa6d..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.project -/.pydevproject -/IMG_2444.JPG.txt From 7a49b91b21a3c31962ba3b70ca8e2b62133d6575 Mon Sep 17 00:00:00 2001 From: rabede Date: Fri, 31 May 2019 15:15:02 +0200 Subject: [PATCH 3/3] Delete .gitignore --- __pycache__/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 __pycache__/.gitignore diff --git a/__pycache__/.gitignore b/__pycache__/.gitignore deleted file mode 100644 index 7fd6357..0000000 --- a/__pycache__/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/common_methods.cpython-37.pyc