2023-02-03 22:13:32 -08:00
|
|
|
# module imports
|
|
|
|
|
import sys
|
|
|
|
|
import json
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
# init logging
|
|
|
|
|
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
|
|
|
|
|
|
|
|
|
|
# variable init
|
|
|
|
|
infojson={}
|
|
|
|
|
source=sys.argv[1]
|
|
|
|
|
|
|
|
|
|
logging.info(f"loading info.json for {source}...")
|
|
|
|
|
with open(f"{source}.json") as file:
|
|
|
|
|
infojson=json.load(file)
|
|
|
|
|
|
|
|
|
|
# TODO: insert method to check url or dict
|
|
|
|
|
logging.debug("determining file type...")
|
2023-02-05 12:07:35 -08:00
|
|
|
from standards import exif
|
2023-02-03 22:13:32 -08:00
|
|
|
if infojson.extension in exif.allowed_exts:
|
|
|
|
|
logging.debug(f"exif module supports {infojson.extesnion} files. using it... ")
|
|
|
|
|
|