Kelsidavis-WoWee/tools/editor/cli_catalog_id_range.hpp
Kelsi cbc4991305 feat(editor): add --catalog-id-range for ID-allocation planning
New utility scans every catalog file under a directory
tree and reports the primary-key id range, gap count,
first gap, and recommended next id (smallest gap if any,
else max+1). Useful when adding new entries without
conflicts: instead of opening the file in --info to read
the current max id, run --catalog-id-range and pick the
recNext value.

Optional --magic <WXXX> filter narrows to one format
family. Output is sorted by file path for deterministic
shell-pipeline behavior.

Skips files whose format has no --info-* surface
(asset formats like .wom/.wob/.whm). Permission-denied
subdirs handled gracefully via skip_permission_denied.
Reuses the same primary-key heuristic + foreign-key
filter as --catalog-pluck and --catalog-find.

CLI flag count 1198 -> 1199.
2026-05-10 02:06:49 -07:00

11 lines
201 B
C++

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