import os
print(os.listdir())

for x in os.listdir():
    x = x.replace("_mer", "")
    if "png" in x or "tga" in x:
        with open(x.replace(".png", ".texture_set.json"), "w+") as outputJson:
            toWrite = f"""|"format_version": "1.16.100", "minecraft:texture_set": |"color": "{x.replace(".png", "")}", "metalness_emissive_roughness": "{x.replace(".png", "")}_mer", "heightmap": "{x.replace(".png", "")}_heightmap"``"""
            outputJson.write(toWrite.replace("|", "{").replace("`", "}"))