Skip to content

Instantly share code, notes, and snippets.

@jamesb93
Created June 13, 2022 10:50
Show Gist options
  • Save jamesb93/8447f8d865d4787b5ebc2464ec84cfd5 to your computer and use it in GitHub Desktop.
Save jamesb93/8447f8d865d4787b5ebc2464ec84cfd5 to your computer and use it in GitHub Desktop.
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)
@jamesb93
Copy link
Author

Useful for finding patches that have non-local ezdac~ which break user experience quite badly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment