blob: 3d2e7cc8d30cdbc0580068dc99b13aade11007b9 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/* Cataract - Static web photo gallery generator
* Copyright (C) 2008 Tomas Bzatek <tbzatek@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __SETUP_H__
#define __SETUP_H__
#include <glib.h>
/* Directory names */
#define THUMBNAIL_DIR "_thumb"
#define IMG_BIG_DIR "_big"
#define IMG_ORIG_DIR "_orig"
#define SETUP_XML "setup.xml"
/* Global gallery setup */
typedef struct {
gboolean verbose;
char *real_templates_dir;
char *setup_xml_path;
char *templates_path;
char *template_index;
char *template_album;
char *template_photo;
char **template_files;
char *footer;
char *meta_author;
char *meta_description;
char *meta_keywords;
gboolean use_title_as_meta;
int thumbnail_quality;
unsigned long thumbnail_landscape_width;
unsigned long thumbnail_landscape_height;
unsigned long thumbnail_portrait_width;
unsigned long thumbnail_portrait_height;
int preview_quality;
unsigned long preview_landscape_width;
unsigned long preview_landscape_height;
unsigned long preview_portrait_width;
unsigned long preview_portrait_height;
char *border_style;
gboolean nofullsize;
gboolean preload;
gboolean use_iptc_exif;
gboolean erase_exif_thumbnail;
char *site_title;
char *add_copyright;
gboolean use_inpage_links;
char *favicon_file;
char *favicon_type;
} TGallerySetup;
/*
* find_setup_xml: try to find setup.xml in standard paths
*/
gboolean find_setup_xml (TGallerySetup *setup);
/*
* parse_setup_xml: XML parser for setup.xml file
*/
gboolean parse_setup_xml (const char *filename, TGallerySetup *setup);
/*
* free_setup_data: free allocated setup data
*/
void free_setup_data (TGallerySetup *setup);
/*
* find_templates_directory: absolute/relative path checks, trying to find templates directory
* - returned string should be freed
*/
char *find_templates_directory (TGallerySetup *setup);
#endif /* __SETUP_H__ */
|