mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
feat(editor): add --catalog-by-name entry-name substring search
New utility complements --catalog-find (id-based, single-id lookup) and --catalog-grep (catalog-header label only) by searching every catalog file under a directory tree for entries whose `name` field contains a substring. Reports each hit as [WXXX] file id=N "name" so the operator can find catalog entries by half- remembered names — "find anything called Mark of the Wild" hits all 5 rank entries across WBAB, "find Argent" hits the WTBD tabard, etc. Optional flags: - --magic <WXXX>: limit search to one format family, same convention as --catalog-find. - --ignore-case: lowercase both pattern and haystack before substring match. Returns rc=0 on hits, rc=1 if no entries matched (so the caller can `if --catalog-by-name ... ; then ...; fi`). Skips files with unknown magic and files whose format has no --info-* surface (asset formats like .wom). Permission-denied subdirs skipped via skip_permission_denied directory_options. Closes the search triplet: --catalog-grep catalog-header label --catalog-find entry primary-key id --catalog-by-name entry name substring CLI flag count 1169 -> 1170.
This commit is contained in:
parent
3c8516f8d4
commit
3c69f33465
6 changed files with 298 additions and 1 deletions
|
|
@ -2255,6 +2255,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Extract one entry by id from any registered catalog format. Auto-detects magic, dispatches to the per-format --info-* handler internally, then prints just the matching entry. Primary-key field is auto-detected (first *Id field, or first numeric)\n");
|
||||
std::printf(" --catalog-find <directory> <id> [--magic <WXXX>] [--json]\n");
|
||||
std::printf(" Search every catalog file under <directory> for an entry with the given id (recursive walk). Prints all hits as [WXXX] file:fieldName=id name. Use --magic to limit search to one format family when the same id is a primary key in multiple\n");
|
||||
std::printf(" --catalog-by-name <directory> <substring> [--magic <WXXX>] [--ignore-case] [--json]\n");
|
||||
std::printf(" Search every catalog file under <directory> for entries whose name contains the substring. Complements --catalog-find (id-based) and --catalog-grep (catalog-header label only). --ignore-case for fuzzy substring matching\n");
|
||||
std::printf(" --gen-weather-temperate <wow-base> [zoneName]\n");
|
||||
std::printf(" Emit .wow weather schedule: clear-dominant + occasional rain + fog (forest / grassland)\n");
|
||||
std::printf(" --gen-weather-arctic <wow-base> [zoneName]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue