oops readded main.py

moved some stuff from xmp to deviantart
This commit is contained in:
elburg 2023-02-05 13:58:50 -08:00
parent e15437252e
commit 86ea8ba4fa
3 changed files with 27 additions and 3 deletions

View file

@ -12,6 +12,8 @@ def makeKeyWordList(tags):
output.append('is_mature') output.append('is_mature')
for item in .get(tags.category_path,[]): for item in catPaths.get(tags.category_path,[]):
output.append(item) output.append(item)
for item in tags.category_path.split('/'):
output.append(item)

22
main.py Normal file
View file

@ -0,0 +1,22 @@
# 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... ")