| 92 | } |
| 93 | |
| 94 | int main(int argc, char* argv[]) { |
| 95 | try { |
| 96 | RootLoader rootLoader({{}, {}, {}, LogLevel::Warn, false, {}}); |
| 97 | rootLoader.setSummary("Search Tiled map files for specific materials or objects."); |
| 98 | rootLoader.addArgument("MaterialId|ObjectName|Property=Value", OptionParser::Required); |
| 99 | rootLoader.addArgument("JsonMapFile", OptionParser::Multiple); |
| 100 | |
| 101 | RootUPtr root; |
| 102 | OptionParser::Options options; |
| 103 | tie(root, options) = rootLoader.commandInitOrDie(argc, argv); |
| 104 | |
| 105 | SearchParameters search = {parseMatchCriteria(options.arguments[0])}; |
| 106 | StringList files = options.arguments.slice(1); |
| 107 | |
| 108 | for (auto file : files) |
| 109 | grepPath(search, file); |
| 110 | |
| 111 | return 0; |
| 112 | } catch (std::exception const& e) { |
| 113 | cerrf("exception caught: {}\n", outputException(e, true)); |
| 114 | return 1; |
| 115 | } |
| 116 | } |
nothing calls this directly
no test coverage detected