-static void usage(const char* argv0) {
- SkDebugf("SKP to PDF rendering tool\n");
- SkDebugf("\n"
-"Usage: \n"
-" %s <input>... [-w <outputDir>] [--jpegQuality N] \n"
-, argv0);
- SkDebugf("\n\n");
- SkDebugf(
-" input: A list of directories and files to use as input. Files are\n"
-" expected to have the .skp extension.\n\n");
- SkDebugf(
-" outputDir: directory to write the rendered pdfs.\n\n");
- SkDebugf("\n");
- SkDebugf(
-" jpegQuality N: encodes images in JPEG at quality level N, which can\n"
-" be in range 0-100).\n"
-" N = -1 will disable JPEG compression.\n"
-" Default is N = 100, maximum quality.\n\n");
- SkDebugf("\n");
-}
+
+DEFINE_string2(inputPaths, r, "",
+ "A list of directories and files to use as input. "
+ "Files are expected to have the .skp extension.");
+
+DEFINE_string2(outputDir, w, "",
+ "Directory to write the rendered pdfs.");
+
+DEFINE_string2(match, m, "",
+ "[~][^]substring[$] [...] of filenames to run.\n"
+ "Multiple matches may be separated by spaces.\n"
+ "~ causes a matching file to always be skipped\n"
+ "^ requires the start of the file to match\n"
+ "$ requires the end of the file to match\n"
+ "^ and $ requires an exact match\n"
+ "If a file does not match any list entry,\n"
+ "it is skipped unless some list entry starts with ~");
+
+DEFINE_int32(jpegQuality, 100,
+ "Encodes images in JPEG at quality level N, which can be in "
+ "range 0-100). N = -1 will disable JPEG compression. "
+ "Default is N = 100, maximum quality.");