Skip to content

Instantly share code, notes, and snippets.

@frank89722
Last active January 4, 2022 15:47
Show Gist options
  • Save frank89722/101e869ea7ce695e746e100fe7f6e574 to your computer and use it in GitHub Desktop.
Save frank89722/101e869ea7ce695e746e100fe7f6e574 to your computer and use it in GitHub Desktop.
import json, os
files = os.listdir()
for m in files:
if 'quark_slate' in m and not 'quark_deepslate' in m:
id = None
with open( m, 'r') as j:
id = json.loads(j.read())
with open(m[:-10] + 'deepslate.json', 'w', encoding='utf-8') as j:
json.dump({'parent': id['parent'][:-5]+'deepslate'}, j, ensure_ascii=False, indent=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment