Added package object

This commit is contained in:
Robert 2020-12-14 13:26:00 +01:00
parent c0fb378f2e
commit ac1ac444aa
8 changed files with 117 additions and 17 deletions

3
examples/CMakeLists.txt Normal file
View file

@ -0,0 +1,3 @@
add_executable(test test.cpp)
target_include_directories(test PRIVATE ankiparser)
target_link_libraries(test PRIVATE ankiparser)

22
examples/test.cpp Normal file
View file

@ -0,0 +1,22 @@
#include <iostream>
#include <Package.hpp>
int main(int argc, char** argv)
{
if (argc != 2)
{
std::cerr << "Usage: " << argv[0] << " <apkg file>" << std::endl;
return 1;
}
try
{
Anki::Package pkg(argv[1]);
}
catch (const char* e)
{
std::cerr << e << std::endl;
}
return 0;
}