mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
feat(editor): add --list-by-magic to filter a tree to one specific format
Walks a directory recursively and lists every file matching a 4-character magic. Reports per-file size, entry count, catalog name, and relative path; aggregates total bytes + total entries across the matches. Useful for narrow per-format inventory: "show me all the WSPL spell catalogs in my project" or "find every WCDF that defines raid difficulty variants under my custom-content tree". The existing --summary-dir gives a multi-format rollup; this is the single-format zoom-in. Magic argument is case-insensitive — "WSPL" and "wspl" both match. If the magic is recognized in the format table the report header includes the format description and category; if not (e.g. a server-custom magic), the listing still works and just notes "unknown magic — no metadata". JSON sidecar via --json. Exit 1 if no matches (so it composes into shell "if any matches, do X" pipelines). This is the 17th cross-format utility: --list-formats / --info-magic / --summary-dir / --rename-by-magic --bulk-rename-by-magic / --touch-tree / --tree-summary-md --catalog-grep / --diff-headers / --audit-tree / --magic-fix --bulk-validate / --bulk-export-json / --bulk-import-json --diff-tree / --orphan-jsons / --list-by-magic CLI flag count 1032 -> 1033.
This commit is contained in:
parent
14c6a947ee
commit
6abd3f5398
6 changed files with 197 additions and 1 deletions
|
|
@ -1379,6 +1379,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Compare two directory trees of .w* catalogs at the magic+size level. Reports only-in-A / only-in-B / magic-changed / size-changed / identical counts and lists changed paths. Exit 1 if any difference\n");
|
||||
std::printf(" --orphan-jsons <dir> [--json]\n");
|
||||
std::printf(" Find .wXXX.json sidecars whose binary .wXXX is missing. Useful after deleting/moving binaries — orphan JSONs accumulate noise and may shadow re-imports. Exit 1 if any orphans found\n");
|
||||
std::printf(" --list-by-magic <dir> <magic> [--json]\n");
|
||||
std::printf(" List every file in a directory tree matching a 4-char magic (e.g. WSPL). Reports per-file size + entry count + catalog name + relative path. Exit 1 if no matches\n");
|
||||
std::printf(" --gen-animations <wani-base> [name]\n");
|
||||
std::printf(" Emit .wani starter: 5 essential animations (Stand / Walk / Run / Death / AttackUnarmed) with fallback chains\n");
|
||||
std::printf(" --gen-animations-combat <wani-base> [name]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue