src/main.cpp

changeset 79
cd8ad39dda76
parent 78
5177d8af5536
equal deleted inserted replaced
78:5177d8af5536 79:cd8ad39dda76
46 "Usage: repoheat [OPTION]... [PATH]...\n\n" 46 "Usage: repoheat [OPTION]... [PATH]...\n\n"
47 "Options:\n" 47 "Options:\n"
48 " -a, --author <name> Only report this author\n" 48 " -a, --author <name> Only report this author\n"
49 " (repeat option to report multiple authors)\n" 49 " (repeat option to report multiple authors)\n"
50 " -A, --authormap <file> Apply an author mapping file\n" 50 " -A, --authormap <file> Apply an author mapping file\n"
51 " --csv Output the gathered data as CSV\n" 51 " --csv Output the gathered data as CSV to stdout\n"
52 " --csv-path <file> Write CSV data to file instead of stdout\n" 52 " --csv-path <file> Write CSV data to file instead of stdout\n"
53 " -d, --depth <num> The search depth (default: 1, max: 255)\n" 53 " -d, --depth <num> The search depth (default: 1, max: 255)\n"
54 " -f, --fragment [indent] Output as fragment (HTML only)\n" 54 " -f, --fragment [indent] Output as fragment (HTML only)\n"
55 " -h, --help Print this help message\n" 55 " -h, --help Print this help message\n"
56 " -p, --pull Try to pull the repositories\n" 56 " -p, --pull Try to pull the repositories\n"
143 return -1; 143 return -1;
144 } 144 }
145 } else if (chk_arg(argv[i], "--csv", nullptr)) { 145 } else if (chk_arg(argv[i], "--csv", nullptr)) {
146 settings.csv = true; 146 settings.csv = true;
147 } else if (chk_arg(argv[i], "--csv-path", nullptr)) { 147 } else if (chk_arg(argv[i], "--csv-path", nullptr)) {
148 settings.csv = true;
148 if (i + 1 < argc) { 149 if (i + 1 < argc) {
149 settings.csv_path.assign(argv[++i]); 150 settings.csv_path.assign(argv[++i]);
150 } else { 151 } else {
151 fputs("missing csv path\n", stderr); 152 fputs("missing csv path\n", stderr);
152 return -1; 153 return -1;

mercurial