diff options
author | sanine <sanine.not@pm.me> | 2022-01-01 13:24:33 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-01-01 13:24:33 -0600 |
commit | 7b78b6986e714cbd7653b89287b928974eb5ee4f (patch) | |
tree | b6334336f722e44bf3020e316976ed5ed3b85ba0 /src/argent.c |
initial commit
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; +} |