diff --git a/tools/editor/main.cpp b/tools/editor/main.cpp index 7625ca75..f058d5e0 100644 --- a/tools/editor/main.cpp +++ b/tools/editor/main.cpp @@ -439,6 +439,8 @@ static void printUsage(const char* argv0) { std::printf(" Print WOT/WHM terrain metadata (tile, chunks, height range) and exit\n"); std::printf(" --info-extract
[--json]\n");
@@ -469,7 +471,8 @@ int main(int argc, char* argv[]) {
static const char* kArgRequired[] = {
"--data", "--info", "--info-wob", "--info-woc", "--info-wot",
"--info-creatures", "--info-objects", "--info-quests",
- "--info-extract", "--info-zone", "--info-wcp", "--list-wcp",
+ "--info-extract", "--list-missing-sidecars",
+ "--info-zone", "--info-wcp", "--list-wcp",
"--unpack-wcp", "--pack-wcp",
"--validate", "--validate-wom", "--validate-wob", "--validate-woc",
"--validate-whm", "--validate-all", "--zone-summary",
@@ -829,6 +832,87 @@ int main(int argc, char* argv[]) {
std::printf("\n");
std::printf(" (run `asset_extract --emit-open` to fill missing sidecars)\n");
return 0;
+ } else if (std::strcmp(argv[i], "--list-missing-sidecars") == 0 && i + 1 < argc) {
+ // Actionable counterpart to --info-extract: emit one line per
+ // proprietary file lacking its open-format sidecar. Pipe into
+ // xargs to drive a targeted re-extract:
+ // wowee_editor --list-missing-sidecars Data/ |
+ // awk '/\.blp$/ {print}' |
+ // xargs asset_extract --emit-png-only
+ std::string dataDir = argv[++i];
+ bool jsonOut = (i + 1 < argc &&
+ std::strcmp(argv[i + 1], "--json") == 0);
+ if (jsonOut) i++;
+ namespace fs = std::filesystem;
+ if (!fs::exists(dataDir)) {
+ std::fprintf(stderr, "list-missing-sidecars: %s does not exist\n",
+ dataDir.c_str());
+ return 1;
+ }
+ std::vector