diff options
Diffstat (limited to 'compiler/ldgallery.1.md')
-rw-r--r-- | compiler/ldgallery.1.md | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/compiler/ldgallery.1.md b/compiler/ldgallery.1.md new file mode 100644 index 0000000..5524409 --- /dev/null +++ b/compiler/ldgallery.1.md | |||
@@ -0,0 +1,154 @@ | |||
1 | --- | ||
2 | pagetitle: User manual - ldgallery | ||
3 | title: LDGALLERY(1) ldgallery user manual | ||
4 | author: Pacien TRAN-GIRARD, Guillaume FOUET | ||
5 | date: 2020-02-15 (v0.1.0.0-SNAPSHOT) | ||
6 | --- | ||
7 | |||
8 | |||
9 | # NAME | ||
10 | |||
11 | ldgallery - a static web gallery generator with tags | ||
12 | |||
13 | |||
14 | # DESCRIPTION | ||
15 | |||
16 | ldgallery is a static gallery generator which turns a collection of tagged pictures into a searchable web gallery. | ||
17 | |||
18 | The ldgallery compiler program processes pictures and aggregates metadata from plain text sidecar files to generate an indexed version of the gallery. It can optionally output a static web viewer along, which allows the content to be presented and searched through from a JavaScript-enabled web browser. This client-side web application does not require any special software on the server's side. | ||
19 | |||
20 | |||
21 | # COMMAND | ||
22 | |||
23 | ldgallery [\--input-dir _./_] [\--output-dir _./out_] [\--with-viewer] | ||
24 | |||
25 | Available options are: | ||
26 | |||
27 | -i, \--input-dir _DIR_ | ||
28 | : Gallery source directory. | ||
29 | Defaults to the current directory. | ||
30 | |||
31 | -o, \--output-dir _DIR_ | ||
32 | : Generated gallery output path. | ||
33 | Must be distinct from the source directory. | ||
34 | Defaults to ./out. | ||
35 | |||
36 | -g, \--gallery-config _FILE_ | ||
37 | : Gallery configuration file. | ||
38 | Defaults to $input-dir/gallery.yaml. | ||
39 | |||
40 | -r, \--rebuild-all | ||
41 | : Invalidate cache and recompile everything. | ||
42 | |||
43 | -c, \--clean-output | ||
44 | : Remove unnecessary files from the output directory. | ||
45 | |||
46 | -w, \--with-viewer | ||
47 | : Include the static web viewer in the output. | ||
48 | |||
49 | -h, \--help | ||
50 | : Display help message. | ||
51 | |||
52 | \--version | ||
53 | : Print version information. | ||
54 | |||
55 | \--numeric-version | ||
56 | : Print just the version number. | ||
57 | |||
58 | |||
59 | # INPUT GALLERY STRUCTURE | ||
60 | |||
61 | A gallery source directory contains the gallery items and their sidecar metadata files, optionally grouped inside sub-directories. | ||
62 | |||
63 | Directory thumbnails can be set by placing a picture file named "_directory", with any image file extension, inside of directories. | ||
64 | |||
65 | An example input gallery directory structure could be as follows: | ||
66 | |||
67 | ``` | ||
68 | ./example-gallery | ||
69 | ├── DSC0001.jpg --------- a picture | ||
70 | ├── DSC0001.jpg.yaml ---- its associated sidecar metadata file | ||
71 | ├── Some directory ------ a directory grouping gallery items | ||
72 | │ ├── _directory.jpg -- a thumbnail for its parent directory | ||
73 | │ ├── _directory.yaml - directory sidecar metadata file | ||
74 | │ ├── DSC0002.jpg | ||
75 | │ ├── DSC0002.jpg.yaml | ||
76 | │ ├── DSC0003.jpg | ||
77 | │ └── DSC0003.jpg.yaml | ||
78 | └── gallery.yaml -------- gallery settings file | ||
79 | ``` | ||
80 | |||
81 | |||
82 | # METADATA SIDECAR | ||
83 | |||
84 | File metadata are read from sidecar files of the same name, with the ".yaml" extension appended. | ||
85 | Metadata contained within item files themselves (e.g. Exif fields for pictures) are ignored. | ||
86 | |||
87 | Directory metadata are read from sidecar files named "_directory.yaml" located within the directory. | ||
88 | |||
89 | When a sidecar file is absent or a particular key omitted, values are set as empty or to their fallback value specified below. | ||
90 | |||
91 | title | ||
92 | : Title of the item. | ||
93 | Defaults to the name of the file or directory. | ||
94 | |||
95 | datetime | ||
96 | : ISO 8601 zoned date and time. | ||
97 | Defaults to the last modification time of the file itself, | ||
98 | or the most recent modification date of a directory's items. | ||
99 | |||
100 | description | ||
101 | : Description for the item. | ||
102 | |||
103 | tags | ||
104 | : List of tags for the item. | ||
105 | Tag groups can be defined using prefixes separated by "." (dot). | ||
106 | Tags specified in a directory metadata sidecar are applied to all items within that directory. | ||
107 | |||
108 | |||
109 | # GALLERY CONFIGURATION | ||
110 | |||
111 | The gallery settings reside in a file named "gallery.yaml" located at the root of the gallery's source directory. | ||
112 | |||
113 | includedDirectories[] | ||
114 | : Glob patterns of directory names to include in the gallery. Defaults to ["*"] (matches all directory names). | ||
115 | |||
116 | excludedDirectories[] | ||
117 | : Glob patterns of directory names to exclude from the gallery. Defaults to [] (none). | ||
118 | |||
119 | includedFiles[] | ||
120 | : Glob patterns of file names to include in the gallery. Defaults to ["*"] (matches all file names). | ||
121 | |||
122 | excludedFiles[] | ||
123 | : Glob patterns of file names to exclude from the gallery. Defaults to [] (none). | ||
124 | |||
125 | tagsFromDirectories.fromParents | ||
126 | : Automatically generate tags from the name of parent directories, | ||
127 | looking up in the hierarchy as far as indicated by this parameter. | ||
128 | Defaults to 0 (do not generate tags from parent directories). | ||
129 | |||
130 | tagsFromDirectories.prefix | ||
131 | : Prefix to use for tags automatically generated from the parent directories' names. | ||
132 | |||
133 | thumbnailMaxResolution.width | ||
134 | : Maximum width in pixels of the item thumbnails, 400 by default. | ||
135 | |||
136 | thumbnailMaxResolution.height | ||
137 | : Maximum height in pixels of the item thumbnails, 300 by default. | ||
138 | |||
139 | pictureMaxResolution.width | ||
140 | : Maximum width in pixels of the picture items, unlimited by default. | ||
141 | |||
142 | pictureMaxResolution.height | ||
143 | : Maximum height in pixels of the picture items, unlimited by default. | ||
144 | |||
145 | |||
146 | # SEE ALSO | ||
147 | |||
148 | The ldgallery source code is available on <https://ldgallery.pacien.org>. | ||
149 | |||
150 | Copyright (C) 2019-2020 Pacien TRAN-GIRARD and Guillaume FOUET. | ||
151 | |||
152 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
153 | |||
154 | 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 Affero General Public License for more details <https://www.gnu.org/licenses/agpl-3.0.html>. | ||