forked from kensanata/sitelen-mute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathefgallery.1
280 lines (280 loc) · 8.5 KB
/
efgallery.1
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
.Dd 2018-05-13
.Dt EFGALLERY 1
.Sh NAME
.Nm efgallery
.Nd static HTML, JavaScript, CSS photo album generator in Perl
.Sh SYNOPSIS
.Nm
.Op Fl fihkortuv
.Op Fl c Ar methods
.Op Fl j Ar N
.Op Fl n Ar ALBUM_NAME
.Op Fl max-full Ar WxH
.Op Fl max-thumb Ar WxH
.Op Fl min-thumb Ar WxH
.Op Fl no-blur
.Op Fl no-sRGB
.Op Fl quality Ar Q
.Op Fl startslideshow
.Op Fl index Ar URL
.Op Fl link-orig Ar TYPE
.Op Fl link-view Ar TYPE
.Op Fl viewdir Ar DIR
.Op Fl url Ar URL
.Op Fl title Ar TITLE
.Op Fl description Ar DESCRIPTION
.Op Fl n Ar album name
.Ar INPUT_DIRECTORY
.Ar OUTPUT_DIRECTORY
.Sh DESCRIPTION
.Nm
is a static photo gallery generator with a minimalist look and feel.
.Nm
shows your photos. There is no server-side processing, only static
generation. The resulting gallery can be uploaded anywhere without
additional requirements and works with any modern browser. Although
.Nm
generates a no-JavaScript mode, enabling JavaScript greatly enhances
the user experience of the photo album. With JavaScript, the gallery
will feature a large area for viewing a single image, and a scrollable
horizontal or vertical bar with thumbnails. The orientation of the
thumbnail bar will be automatically chosen based on the size of the
browser window.
.Pp
The user can tap the space bar to start the slide show or click on a
thumbnail to start it with that image. The the arrow keys on the
keyboard to move forward and back. The user can also click on the
thumbnails to quickly go to another image. Each image has a unique
anchor tag, and the user can copy and paste the URL from the address
bar of the browser which will point to the currently displayed
image. Clicking on the previewed image will display the original
at full resolution when the include option is specified with
.Fl i .
.Pp
.Nm
reads in JPEG, PNG and TIFF images,
and automatically generates preview images, backdrops and thumbnails using
.Xr ImageMagick 1 .
It will automatically correct the orientation of the generated
images using EXIF tags in the original images, using either
.Xr exiftran 1
or
.Xr exifautotran 1 .
It can also optimize the generation of thumbnails by centering on faces if the
.Fl f
option is used and
.Xr facedetect 1
is installed.
The generated images are automatically optimized using
.Xr jpegoptim 1
and/or
.Xr pngcrush 1
if these programs are installed.
If the original images contain color profiles,
then the generated images will be converted to the sRGB color space using
.Xr tificc 1
if that program is installed, unless the
.Fl no-sRGB
option is specified.
.Pp
.Nm
can also display captions with the images. These can either be read from the
EXIF headers (using the Title, Description and optionally the Comment
tags), or from an external file (using the same filename as the
image but with a .txt or .xmp extension). The
.Fl c
option can be used to control which methods of caption extraction will be used.
.Pp
You have to manually specify the directory with the original image
files and the desired output directory for the web gallery.
Optionally, you can specify a title for the gallery. By default,
the gallery will include a downloadable ZIP archive with the complete
photo album, unless either the
.Fl d
option is specified.
After the gallery has been generated,
you may have to change the file permissions using
.Xr chmod 1
to allow them to be read by others.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl h, -help
Display a list of options.
.It Fl v
Verbose output (show commands as being executed), can be repeated for more verbosity.
.It Fl i
Include individual originals in the generated album.
.It Fl o
Do not auto-orient images.
.It Fl t
Do not sort images chronologically.
.It Fl r
Reverse the order of the images.
.It Fl p
Do not automatically include full-sized panoramas.
.It Fl d
Do not generate a full album download.
.It Fl f
Improve thumbnail cutting by performing face detection.
Requires
.Xr facedetect 1
to be installed.
.It Fl c Ar methods
Set the caption extraction method (txt, xmp, exif, cmt or none).
Multiple methods can be specified by giving a comma-separated list.
The default is txt,xmp,exif.
.It Fl j Ar N
Use
.Ar N
threads to process the images.
.It Fl u
Update an existing gallery by adding additional new images. You
can force an update of individual images my deleting them from the
.Xr img
sub-directory in an existing gallery.
.It Fl max-full Ar WxH
Set the maximum full image size to
.Ar WxH
pixels. The default is 1600x1200 pixels.
.It Fl max-thumb Ar WxH
Set the maximum size of thumbnails to
.Ar WxH
pixels. The default is 267x200 pixels.
.It Fl min-thumb Ar WxH
Set the minimum size of thumbnails to
.Ar WxH
pixels. The default is 150x112 pixels.
.It Fl no-blur
Do not generate image specific blurs but use a generic, dark noise background.
.It Fl no-sRGB
Do not try to remap preview and thumbnail image color profiles to sRGB.
.It Fl quality Ar Q
Set the JPEG quality of the preview images to
.Ar Q .
The default is 90.
.It Fl startslideshow
A gallery URL will by default show the thumbnail bar at the image
specified (or the first one if no anchor was given). By setting
this option, the gallery slide show starts immediately instead.
.It Fl index Ar URL
Specify the URL location for the index and back buttons.
.It Fl link-orig[=TYPE]
Change the method used to copy the original images. If this option
is not given, the method defaults to "copy". Otherwise the type
must be one of
.Ar copy ,
.Ar hard ,
.Ar syml ,
or
.Ar ref :
for normal copy, hard-linking, symbolic-linking or ref-linking (on
Linux) respectively.
.It Fl link-view[=TYPE]
Similarly, the "copy" method to use for the view sub-directory
containing the JavaScript, CSS, and other web resources; this
defaults to symbolic-linking. In this way updates to the JavaScript
are also effective on
.Nm
albums created with earlier versions.
.It Fl viewdir Ar DIRECTORY
Instead of using the default view sub-directory containing the
JavaScript and other web resources, use the specified one (for
testing new versions).
.It Fl url Ar URL
The URL where you will install the gallery, for social media.
.It Fl title Ar TITLE
The title for your web gallery, for social media.
.It Fl description Ar DESCRIPTION
A description of your web gallery, for social media.
.El
.Ss Linking on Social Media
Linking to your web gallery on social media will not produce a nice
preview unless you provide the following three arguments: the title
to use
.Pq Fl title Ns ,
a short description
.Pq Fl description Ns ,
and the entry URL
.Pq Fl url Ns .
The first image in the gallery will be used as the preview image.
.Ss Slide Show Controls
Hovering over the small question mark in the upper left next to
image timestamp pops up a table of slide show controls for reference.
.Pp
Tapping the
.Ar Space
bar starts or stops the slide show. The display speed can be
controlled with the
.Ar UpArrow , F ,
or
.Ar f
for "faster", whilst the
.Ar DownArrow , S ,
or
.Ar s
specifies "slower".
.Pp
Typing
.Ar 5
gets one back to the default speed of five seconds per image. The
.Ar Delete
key, also called the
.Ar Backspace
key, toggles the direction of the slide show. The
.Ar RightArrow , N ,
or
.Ar n
skips to the "next" image whilst the
.Ar LeftArrow , P ,
or
.Ar p
skips to the "previous" image.
.Pp
Captions can be enabled or disabled by clicking on the caption icon,
and if the original images were included (see
.Fl i
option), clicking on the large image or eye icon will show that original.
.Pp
On smart phones, swiping up and right skips to the previous image and
down and left to the next image. Slide show speed and direction
is simply controlled by appropriate swiping.
.Sh BUGS and TODO
Numerous bugs have been discovered and fixed during the long lifetimes of
.Xr fgallery
and
.Nm ;
nevertheless, new ones will no doubt appear as web technology and
digital photography evolve.
.Pp
Video files (iPhone "Live" photographs) are not supported and panorama images don't always work well.
.Sh SEE ALSO
.Xr ImageMagick 1 ,
.Xr exiftran 1 ,
.Xr exifautotran 1 ,
.Xr jpegoptim 1 ,
.Xr pngcrush 1 ,
.Xr tificc 1 ,
.Xr facedetect 1 Pq see Pa https://www.thregr.org/~wavexx/software/facedetect/ .
.Sh AUTHORS
A first version originally called
.Xr fgallery
was written by
.An "Yuri D'Elia" Aq [email protected]
in 2011.
.Pp
Since 2018,
.Xr sitelen-mute
is maintained for Linux at
.Xr github
by
.An "Alex Schroeder" Aq [email protected]
and includes Docker contributions from
.An "Petr Ruzicka" Aq [email protected] .
.Pp
.Nm
has been enhanced and maintained by
.An "Adrian Steinmann" Aq [email protected]
since 2016 for BSD systems at
.Xr github
which also serves as the master site for the pkgsrc package
.Pa https://www.pkgsrc.se/wip/efgallery/ .