You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# 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...")
|
|
|
|
from standards import exif
|
|
|
|
if infojson.extension in exif.allowed_exts:
|
|
|
|
logging.debug(f"exif module supports {infojson.extesnion} files. using it... ")
|
|
|
|
|