mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 19:13:52 +00:00
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
11 lines
195 B
C++
11 lines
195 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
bool handleBulkJson(int& i, int argc, char** argv, int& outRc);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|