mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
feat(editor): add --bulk-export-json + --bulk-import-json paired utilities
Two new cross-format utilities for git-friendly catalog editing:
--bulk-export-json <dir> recursively walks the tree, peeks
each file's magic, and dispatches the
per-format --export-X-json flag for
every .w* it finds. Writes one .json
sidecar per binary.
--bulk-import-json <dir> inverse direction — recursively walks
*.wXXX.json sidecars and dispatches
the per-format --import-X-json flag
to write back the byte-identical
binary.
Both report total / processed / failed / skipped counts and exit
1 on any failure. Asset-style formats with no per-format JSON
exporter are counted in the "skipped" bucket.
Use case — git-friendly diffs of binary catalogs:
--bulk-export-json mydir # convert binaries to JSON
git add mydir/*.json && git commit # version control as text
git diff # see exact catalog changes
--bulk-import-json mydir # restore binaries
Verified end-to-end: 5 different format presets (WSRG, WCDF,
WMAT, WTLE, WCTR) round-trip byte-identical through export -> JSON
-> import. Reuses the same shellQuote / WEXITSTATUS scaffolding
as --bulk-validate. CLI flag count 972 -> 974.
This brings the cross-format utility count to 14:
--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
This commit is contained in:
parent
4426f26f79
commit
736ec3a1c0
6 changed files with 305 additions and 0 deletions
|
|
@ -138,6 +138,7 @@ const char* const kArgRequired[] = {
|
|||
"--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",
|
||||
"--gen-animations", "--gen-animations-combat", "--gen-animations-movement",
|
||||
"--info-wani", "--validate-wani",
|
||||
"--export-wani-json", "--import-wani-json",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue