From 7b78b6986e714cbd7653b89287b928974eb5ee4f Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 1 Jan 2022 13:24:33 -0600 Subject: initial commit --- src/argent.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/argent.c (limited to 'src/argent.c') 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 +#include +#include + +#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; +} -- cgit v1.2.1