#ifndef REVELA_SITE_H #define REVELA_SITE_H #include "config.h" #include "render.h" #include "components.h" #include #ifndef SITE_DEFAULT_RESOURCES #define SITE_DEFAULT_RESOURCES "/usr/share/revela" #endif #define STATICDIR "static" #define CONTENTDIR "content" #define TEMPLATESDIR "templates" #define DEFAULTALBUM "unorganized" struct site { struct site_config *config; MagickWand *wand; char *root_dir; char *output_dir; char *content_dir; /* * Indicates how many characters after the full root dir path of the input * directory the relative path of the albums + the content dir start. See * site_init() */ size_t rel_content_dir; /* List/vector with the albums to be sorted from newer to older */ struct vector *albums; /* Files/dirs that belong to albums and which shouldn't be deleted */ struct hmap *album_dirs; struct render render; bool dry_run; size_t albums_updated; }; bool site_build(struct site *); bool site_load(struct site *); bool site_init(struct site *); void site_deinit(struct site *); #endif