Created
June 13, 2022 10:50
-
-
Save jamesb93/8447f8d865d4787b5ebc2464ec84cfd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from pathlib import Path | |
help_files = [Path(x) for x in Path("help").glob("*.maxhelp")] | |
def ezdac_search(patch, patch_name): | |
if patch.get("maxclass") == "ezdac~" and not patch.get("local"): | |
print(patch_name, patch) | |
for k, v in patch.items(): | |
if isinstance(v, dict): | |
ezdac_search(v, patch_name) | |
elif isinstance(v, list): | |
for item in v: | |
if isinstance(item, dict): | |
ezdac_search(item, patch_name) | |
for hf in help_files: | |
with open(hf, "r") as f: | |
patch = json.load(f) | |
ezdac_search(patch, hf.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful for finding patches that have non-local ezdac~ which break user experience quite badly.