29 lines
899 B
C++
29 lines
899 B
C++
#include <iostream>
|
|
#include <vector>
|
|
#include "Core/Arguments.h"
|
|
#include "Core/Logo.h"
|
|
#include "Reader/FileReader.h"
|
|
#include "Utils/Logging.h"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
std::cout << "\x1B[2J\x1B[H";
|
|
EliyaLogo::draw();
|
|
std::vector<std::string> args;
|
|
for (int i = 0; i < argc; i++)
|
|
args.emplace_back(argv[i]);
|
|
|
|
auto argParser = Arguments(argc, args);
|
|
argParser.parseArgs();
|
|
|
|
// test if the paths are provided
|
|
std::string inputDir = argParser.getArgOrDefault("files", "");
|
|
std::string opDir = argParser.getArgOrDefault("output", std::string(std::getenv("HOME")) + "/.eliya");
|
|
if (inputDir.empty() || opDir.empty()) {
|
|
Logging::error("No Input or Operation path specified", "ArgumentValidator");
|
|
exit(-1);
|
|
}
|
|
auto reader = FileReader(inputDir, opDir);
|
|
reader.pureRead();
|
|
reader.readAudioFiles();
|
|
return 0;
|
|
} |