Analyze only exif enabled files
This commit is contained in:
parent
4834f8fa6e
commit
e40f546137
27
exv.py
27
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:
|
||||
|
Loading…
Reference in New Issue
Block a user