diff --git a/exv.py b/exv.py index 9499933..f9cf59d 100755 --- a/exv.py +++ b/exv.py @@ -7,6 +7,30 @@ import json from os.path import isfile, isdir from os import walk +TYPES = [ + "JPEG", + "JPG", + "EXV", + "CR2", + "CRW", + "MRW", + "TIFF", + "TIF", + "WEBP", + "DNG", + "NEF", + "FEF", + "ARW", + "RW2", + "SR2", + "SRW", + "ORF", + "PNG", + "PGF", + "RAF", + "PSD", + "JP2" + ] def extractor(input_files, start, end, recursive): if not isinstance(input_files, type(list())): @@ -30,7 +54,8 @@ def extractor(input_files, start, end, recursive): if isdir(item): for (dirpath, dirnames, filenames) in walk(item): for filename in filenames: - files.append("{}/{}".format(dirpath, filename)) + if filename.split(".")[-1].upper() in TYPES: + files.append("{}/{}".format(dirpath, filename)) if not recursive: break else: