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.
This commit is contained in:
Kelsi 2026-05-09 20:27:16 -07:00
parent b8e039f834
commit 34c7021e5c
6 changed files with 185 additions and 0 deletions

View file

@ -136,6 +136,7 @@ const char* const kArgRequired[] = {
"--export-wliq-json", "--import-wliq-json",
"--info-magic", "--summary-dir", "--rename-by-magic",
"--bulk-rename-by-magic", "--touch-tree", "--tree-summary-md",
"--catalog-grep",
"--gen-animations", "--gen-animations-combat", "--gen-animations-movement",
"--info-wani", "--validate-wani",
"--export-wani-json", "--import-wani-json",