Some refactorings to incoporate CLI parsing
Some checks failed
Build ptprnt / build (push) Failing after 31s

This commit is contained in:
2023-10-13 00:02:44 +02:00
parent 7d0cb89bda
commit 3431cc2225
10 changed files with 101 additions and 40 deletions

View File

@@ -17,21 +17,17 @@
*/
#include <CLI/CLI.hpp>
#include <spdlog/common.h>
#include <spdlog/spdlog.h>
#include "PtouchPrint.hpp"
void setupLogger() {
spdlog::set_level(spdlog::level::debug);
spdlog::info("Starting ptprnt {}", PROJ_VERSION);
}
int main(int argc, char** argv) {
setupLogger();
PtouchPrint ptouchprnt;
ptouchprnt.init();
ptouchprnt.run();
return 0;
PtouchPrint ptouchprnt(PROJ_VERSION);
int ret = ptouchprnt.init(argc, argv);
if (ret != 0) {
return ret;
}
return ptouchprnt.run();
}