Datasets:
Download scripts/build_characters.py from Linzhan/Mixamo-Animations-Characters: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/datasets/Linzhan/Mixamo-Animations-Characters/resolve/main/scripts/build_characters.py
- Command line
-
hf download hf://datasets/Linzhan/Mixamo-Animations-Characters/scripts/build_characters.py
-
curl -L -o build_characters.py https://huggingface.co/datasets/Linzhan/Mixamo-Animations-Characters/resolve/main/scripts/build_characters.py
584 Bytes
| #!/usr/bin/env python3 | |
| """Regenerate ../characters.json from manifests/character_manifest.jsonl.""" | |
| import json, os | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| ROOT = os.path.dirname(HERE) | |
| mf = os.path.join(HERE, "manifests", "character_manifest.jsonl") | |
| out = os.path.join(ROOT, "characters.json") | |
| d = {} | |
| for line in open(mf): | |
| line = line.strip() | |
| if not line: continue | |
| e = json.loads(line) | |
| d[e["file"]] = {"name": e.get("name"), "uuid": e.get("uuid")} | |
| json.dump(d, open(out, "w"), indent=1, ensure_ascii=False, sort_keys=True) | |
| print("wrote", out, "->", len(d)) | |