#!/usr/bin/env python3
import json
import string
import random
import glob, os
import sys

for root, dirs, files in os.walk("/Users/connor/Documents/App_GP/"):
    directory = os.path.join(os.getcwd(), root)
    for file in files:
        dir_name = root.split("/");
        dir_name = dir_name[len(dir_name)-1]
        if dir_name.startswith(sys.argv[1]+"_"):
            if (file.endswith(".png") or file.endswith(".jpg")) and "_mark" not in file:
                path = os.path.join(directory, file)
                os.system("./image_mark.py "+ path + " " + sys.argv[2].split("_")[0])