Files
hacs_default/scripts/sort.py
Joakim Sørensen d046ee8add Add template (#1827)
2023-04-04 21:24:54 +02:00

20 lines
404 B
Python

import json
categories = [
"blacklist",
"appdaemon",
"integration",
"netdaemon",
"plugin",
"python_script",
"template",
"theme",
]
for category in categories:
with open(category, "r") as cat_file:
content = json.loads(cat_file.read())
with open(category, "w") as cat_file:
cat_file.write(json.dumps(sorted(content, key=str.casefold), indent=2))