-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (22 loc) · 791 Bytes
/
main.cpp
File metadata and controls
28 lines (22 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <argparse/argparse.hpp>
#include "handlers.h"
int main(int argc, char** argv) {
auto parser = argparse::ArgumentParser(argc, argv)
.prog("bars-tool")
.description("A utility to extract BARS files. "
"(currently only supporting Nintendo Switch Sports and other v5 AMTA metadata files)");
parser.add_argument("input").help("Input file or directory");
parser.add_argument("output").help("Output directory (creates subdirectory for each input file)");
if (argc <= 1)
{
parser.print_help();
exit(1);
}
auto const result = parser.parse_args();
main_handler(
result.get<std::string>("input"),
result.get<std::string>("output")
);
return 0;
}