blob: 3980ea0f00a5e6c62eebc746a532fe9e62f28fe8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef REVELA_SITE_H
#define REVELA_SITE_H
#include "config.h"
#include "render.h"
#include "components.h"
#include <wand/magick_wand.h>
#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
|