Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# See LICENSE.txt file for licensing information
# See CHANGES.txt file for all contributors and changes
#
"""
Runs Exif tag extraction in command line.
"""
import sys
import getopt
import logging
import timeit
from exifread.tags import DEFAULT_STOP_TAG, FIELD_TYPES
from exifread import process_file, exif_log, __version__
logger = exif_log.get_logger()
def usage(exit_status):
"""Show command line usage."""
msg = ('Usage: EXIF.py [OPTIONS] file1 [file2 ...]\n'
'Extract EXIF information from digital camera image files.\n\nOptions:\n'
'-h --help Display usage information and exit.\n'
'-v --version Display version information and exit.\n'
'-q --quick Do not process MakerNotes.\n'
'-t TAG --stop-tag TAG Stop processing when this tag is retrieved.\n'
'-s --strict Run in strict mode (stop on errors).\n'
'-d --debug Run in debug mode (display extra info).\n'
'-c --color Output in color (only works with debug on POSIX).\n'
)
print(msg)
sys.exit(exit_status)