kanjivg-tools/Tools/KanimajiTool/Main.cpp

24 lines
581 B
C++

#include <Kanimaji/Kanimaji.hpp>
#include <print>
int main(const int argc, const char *argv[])
{
if (argc != 3) {
std::println("Usage: KanimajiTool SOURCE DESTINATION\n\n"
"SOURCE - Path to a file from the KanjiVG dataset.\n"
"DESTINATION - Path to write the animated SVG.\n"
);
return 1;
}
try {
Kanimaji::AnimateFile(argv[1], argv[2]);
}
catch (const std::exception& e) {
std::println("Could not animate {}: {}", argv[1], e.what());
return 1;
}
return 0;
}