kanjivg-tools/Tools/KanimajiTool/Main.cpp

25 lines
581 B
C++
Raw Permalink Normal View History

2025-05-25 00:42:58 +02:00
#include <Kanimaji/Kanimaji.hpp>
#include <print>
int main(const int argc, const char *argv[])
2025-05-25 00:42:58 +02:00
{
2025-06-08 14:52:20 +02:00
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 {
2025-06-08 14:52:20 +02:00
Kanimaji::AnimateFile(argv[1], argv[2]);
}
catch (const std::exception& e) {
2025-06-08 18:36:49 +02:00
std::println("Could not animate {}: {}", argv[1], e.what());
return 1;
}
2025-05-25 00:42:58 +02:00
return 0;
2025-05-25 00:42:58 +02:00
}