From 46b7119fab32b05923dbf9cda7cd6ce62f572846 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 9 Jan 2017 14:01:51 -0500 Subject: Initial commit --- generator/main.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 generator/main.cpp (limited to 'generator/main.cpp') diff --git a/generator/main.cpp b/generator/main.cpp new file mode 100644 index 0000000..5a3d2dd --- /dev/null +++ b/generator/main.cpp @@ -0,0 +1,36 @@ +#include +#include +#include "generator.h" + +void printUsage() +{ + std::cout << "usage: generator input output" << std::endl; + std::cout << "input :: path to an AcousticBrainz data directory" << std::endl; + std::cout << "output :: datafile output path" << std::endl; +} + +int main(int argc, char** argv) +{ + if (argc == 3) + { + try + { + cadence::generator::generator app(argv[1], argv[2]); + + try + { + app.run(); + } catch (const std::exception& e) + { + std::cout << e.what() << std::endl; + } + } catch (const std::exception& e) + { + std::cout << e.what() << std::endl; + printUsage(); + } + } else { + std::cout << "cadence datafile generator" << std::endl; + printUsage(); + } +} -- cgit 1.4.1