diff options
Diffstat (limited to 'src/argent.c')
-rw-r--r-- | src/argent.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/argent.c b/src/argent.c new file mode 100644 index 0000000..c42161a --- /dev/null +++ b/src/argent.c @@ -0,0 +1,35 @@ +#include <lua.h> +#include <lualib.h> +#include <lauxlib.h> + +#include "honeysuckle.h" +#include "md4c-html.h" +#include "tinydir.h" + +#include "options.h" + + +int main(int argc, char **argv) +{ + struct argent_options opts; + int error = parse_options(&opts, argc, argv); + + if (error) + return 1; + + printf("configuration file: %s\n" + "output directory: %s\n", + opts.conf_filename, + opts.output_dir); + + lua_State *L = luaL_newstate(); + luaL_openlibs(L); + + error = luaL_dofile(L, opts.conf_filename); + if (error != 0) { + fprintf(stderr, "error: %s\n", lua_tostring(L, -1)); + } + + lua_close(L); + return 0; +} |