Kelsidavis-WoWee/tools/editor/cli_catalog_grep.hpp
Kelsi 34c7021e5c feat(editor): add --catalog-grep search-by-name across content tree
Recursively walks a directory, parses the standard catalog
header (magic + version + name + entryCount) of every
recognized catalog format, and reports files whose internal
catalog NAME field matches a pattern. Useful when you've
got a content bundle and need to find "where is the catalog
named WintergraspUI?" or "list every Starter* preset in
this directory" without per-format parsing.

Case-insensitive substring match by default (--case-sensitive
opts in to literal match). Returns exit 1 when no match —
designed for shell composition (`if catalog-grep ... ; then ...`).
World/asset formats (.wom/.wob/.whm/.wot/.wow) are skipped
since they don't follow the catalog-header layout.

Supports --json variant for tooling integration. Reuses
cli_format_table.cpp so any new catalog format is searchable
automatically.
2026-05-09 20:27:16 -07:00

11 lines
198 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
bool handleCatalogGrep(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee