diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-07 02:02:45 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-07 02:02:45 +0300 |
commit | e3a41da5a0a3d70ac53591f2b66144f2be2b3871 (patch) | |
tree | 789cc69b05f2447c11f04dbb6ae972ffa0acd1c9 /include/render.h | |
download | revela-e3a41da5a0a3d70ac53591f2b66144f2be2b3871.tar.gz revela-e3a41da5a0a3d70ac53591f2b66144f2be2b3871.zip |
Initial commit.
Almost functional but still missing features and lacking testing.
Diffstat (limited to 'include/render.h')
-rw-r--r-- | include/render.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/render.h b/include/render.h new file mode 100644 index 0000000..faa6f73 --- /dev/null +++ b/include/render.h @@ -0,0 +1,38 @@ +#ifndef REVELA_RENDER_H +#define REVELA_RENDER_H + +#include <sys/stat.h> + +#include "bstree.h" +#include "config.h" +#include "template.h" +#include "components.h" + +struct render { + /* Unja environment */ + struct env *env; + /* List of years with albums in each year */ + struct vector *years; + /* List of albums */ + struct vector *albums; + /* Hashmap used for all templates */ + struct hashmap *common_vars; + /* Modification time for the templates dir */ + struct timespec modtime; + bool dry_run; +}; + +bool render_make_index(struct render *, const char *path); + +bool render_make_album(struct render *r, const char *path, + const struct album *album); + +bool render_make_image(struct render *r, const char *path, + const struct image *image); + +bool render_init(struct render *, const char *path, struct site_config *, + struct bstree *albums); + +void render_deinit(struct render *); + +#endif |