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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>llgal - On-line gallery generator - How-To?</title>
<link rel="stylesheet" type="text/css" href="main.css"/>
</head>
<body>
<h1 class="title">llgal How-To?</h1>
<p><em>
This How-To is available <a href="http://bgoglin.free.fr/llgal/">on-line</a>
and in the tarball and distribution packages.
</em></p>
<div class="howto">
<h2 class="section">Basics</h2>
<h3 class="question"><a id="basic_use">How do I use llgal?</a></h3>
Place some images and movies in a directory and simply run
<tt>llgal</tt> inside it.
It will generate an index file and some slides.
<h3 class="question"><a id="basic_modify">How do I modify a gallery?</a></h3>
You may add or remove some images in the working directory, and re-run
<tt>llgal</tt> with different options to update the gallery contents
or layout.
If an image has been modified, you may have to force the regeneration
of thumbnails and scaled images with <tt>-f</tt>.
<h3 class="question"><a id="basic_reduce_slide">How do I reduce the size of the slides?</a></h3>
If your images are large, you should try
<pre>
llgal --sy 480
</pre>
to limit the height of the image to 480 pixels in slides.
Note that a click on the slide will actually open the
original full-size image.
You may even ignore the original images completely by passing
<tt>--nf</tt> so as to remove links from slides' scaled images
to the original unscaled full images.
<h3 class="question"><a id="basic_title_captions">How do I set the title and captions?</a></h3>
You may set the title on the command line through:
<pre>
llgal --title "My title"
</pre>
To change captions, the easiest way is to ask <tt>llgal</tt>
to generate captions first, with:
<pre>
llgal --gc
</pre>
Then, you may edit the captions file (<tt>.llgal/captions</tt>)
to update all captions.
You then run <tt>llgal</tt> again, it will detect the existence
of the captions file and use it.
<pre>
llgal
</pre>
<h2 class="section">Captions and special slides</h2>
<h3 class="question"><a id="captions_generate">How do I generate captions from images?</a></h3>
When generating the captions file with <tt>--gc</tt>, <tt>llgal</tt>
may automatically generate several fields for each image.
Available fields are <b>image comments</b>, <b>filename</b> and
<b>image timestamp</b>.
<tt>llgal</tt> will try to generate each field and concat them
to create the caption.
To generate captions from the filename only, run:
<pre>
llgal --gc --cf
</pre>
To generate captions from the image timestamp (extracted from
Exif tags when existing) and filename:
<pre>
llgal --gc --cf --ct
</pre>
To generate captions from the image comments (extract from
JFIF or Exif), timestamp and filename:
<pre>
llgal --gc --cc --cf --ct
</pre>
These commands will generate a captions file that you might then
use when generating the gallery.
You might also directly generate captions during the gallery
generation through something like:
<pre>
llgal --cc --ct
</pre>
Note that if a captions file exists, command line options about
captions generation are omitted.
Also note that <tt>--cc</tt> and <tt>--ct</tt> require the
Image::ExifTool Perl module to be installed.
<h3 class="question"><a id="captions_text_link">How do I add a slide containing some text or link?</a></h3>
After generating the captions file with <tt>--gc</tt>, you might add
a special slide containing only some text by inserting the following
line in the file:
<pre>
TXT: the text that is shown in the slide ---- the caption under the slide
</pre>
Regenerating the gallery will then add this slide.
The following line add a special slide with a link instead of plain text:
<pre>
LNK: the url ---- the label of the link in the slide ---- the caption under the slide
</pre>
If you do not want those slides containing a single link or text to appear like this,
you may use <tt>-L</tt> so that they will be listed as a text line in the index.
You may also use <tt>LNKNOSLIDE:</tt> entries to add links without slides.
<h3 class="question"><a id="captions_add">How do I add new entries to a captions file?</a></h3>
Re-running <tt>llgal</tt> with <tt>--gc</tt> will rescan the existing files and
add the missing ones at the end of the captions file.
You then re-run <tt>llgal</tt> to update the gallery regarding the new captions file.
<h3 class="question"><a id="captions_keep">How do I keep the list of images involved in a gallery?</a></h3>
The captions file may also be used to keep track of the contents of a gallery.
Even if you do not add some captions or title in the captions file, you may use
it to list the exact set of images that you want to appear in the gallery.
<h2 class="section">Managing slides</h2>
<h3 class="question"><a id="slides_order">How do I change the order of the slides?</a></h3>
The order of the slides might be changed with the <tt>sort</tt> option
on command-line.
For instance, <tt>--sort=iname</tt> sorts by name case insensitively,
while <tt>--sort=revdate</tt> sorts by date, in reverse order.
It is also possible to set the order by changing captions positions
in the captions file.
<h3 class="question"><a id="slides_select">How do I select which files are included in a gallery?</a></h3>
By default, <tt>llgal</tt> does only include images and movies in the
gallery.
It is possible to force it to use all existing files in the directory
(except <tt>*.html</tt> and <tt>.*</tt>) with:
<pre>
llgal -A
</pre>
It is also possible to exclude some files with <tt>--exclude regexp</tt>
where <tt>regexp</tt> is a Perl regexp. For instance, to exclude all
<tt>AVI</tt> files starting with <tt>MVI</tt>:
<pre>
llgal --exclude 'MVI.*\.AVI'
</pre>
File that were excluded might be reincluded by using the similar
<tt>--include</tt> option.
Finally, it is always possible to exclude files by generating a captions
file and removing some entries.
Note that the captions file is a good way to keep the list of images that
are involved in the gallery, even if you do not want any caption.
<h2 class="section">Layout</h2>
<h3 class="question"><a id="layout_slide_index">How do I change the layout of the slides and index?</a></h3>
The main layout of generated webpages is based on HTML templates
(<tt>indextemplate.html</tt> and <tt>slidetemplate.html</tt>)
and a CSS style-sheet (<tt>llgal.css</tt>).
It is possible to place modified versions of these files in the <tt>.llgal</tt>
directory (or in <tt>$HOME/.llgal/</tt>) to change the layout.
<h3 class="question"><a id="layout_image_size">Why does llgal ignore the image dimension limits that I give?</a></h3>
Since <a href="#misc_slow">converting images might be slow</a>, <tt>llgal</tt> does
not always regenerate thumbnails and scaled images. By default, it only does if the
original images has been changed since last generation.
To force regeneration, for instance if you changed the thumbnails (with <tt>--tx</tt>
or <tt>--ty</tt>) or scaled images dimensions (with <tt>--sx</tt> or <tt>--sy</tt>),
you may use <tt>-f</tt> (or <tt>force_image_regeneration</tt>).
<h3 class="question"><a id="layout_thumbnail_size">Does changing the maximal thumbnail dimensions really work?</a></h3>
By default, the width and height of thumbnails are both limited. Both dimension
limits may be changed with <tt>--tx</tt> or <tt>--ty</tt>, but changing a single
one does affect the other one. It means that the other should be changed too in
most of the circumstances.
Note that changing one of these options requires to
<a href="#layout_image_size">force regeneration of thumbnails</a>.
<h3 class="question"><a id="layout_slide_dimensions_from_css">How can I get the images in slides to adapt their size to the window?</a></h3>
<tt>llgal</tt> has been designed to create fixed-size slides. If, instead, you would like your
images in slides to follow the size of the window, you may use the <tt>slide_dimensions_from_css</tt>
option, either from a configuration file or with <tt>--option</tt> on the command line.
<tt>llgal</tt> will then remove all absolute dimensions for images in HTML slides.
Finally, you will be able to set the image width through the CSS slide sheet (<tt>llgal.css</tt>),
for instance by adding <tt>width: 100%</tt> in <tt>table.slide td.image-slide img</tt>.
<h3 class="question"><a id="layout_text">How do I change the text that llgal generates in slides and index?</a></h3>
All text that appears in generated slides might be configured through configuration
options.
One day, there might be a full internationalization support through <tt>gettext</tt>.
<h3 class="question"><a id="layout_click_to_next_slide">How can I go to the next slide when clicking on the current one?</a></h3>
By default, you need to click on <tt>Next</tt> to go to the next slide.
If you passed <tt>--sx</tt> or <tt>--sy</tt>, clicking on the slide will lead you to the
original image. If not, clicking does nothing.
If you want this click to jump to the next slide, you just need to modify the slidetemplate
and replace
<pre>
<!--THIS-SLIDE-->
</pre>
with
<pre>
<a href="<!--NEXT-SLIDE-->"><!--THIS-SLIDE--></a>
</pre>
and regenerate the gallery.
Of course, if you keep using <tt>--sx</tt> or <tt>--sy</tt>, you will get into problems
since there will be 2 hyperlinks on each slide.
<h3 class="question"><a id="layout_thumnail_video_subdir">How do I set a thumbnail for a video or a subgallery?</a></h3>
All non-image slides and thumbnails are usually basic text.
It is possible to force <tt>llgal</tt> to use a special thumbnail or scaled image
by adding a special file in the local <tt>.llgal</tt> directory with prefix
<tt>mythumb_</tt> or <tt>myscaled_</tt>.
For instance, <tt>mythumb_image24.jpg</tt> will be used as a thumbnail for image
<tt>image24.jpg</tt>.
<tt>mythumb_subdir3.jpg</tt> will be used for sub-directory <tt>subdir3</tt>.
And <tt>myscaled_bar.avi.jpg</tt> will be used as a scaled image for movie <tt>bar.avi</tt>.
The extension for the thumbnail or scaled image may be any image extension
that <tt>llgal</tt> recognizes.
<h3 class="question"><a id="layout_exif">How do I get image EXIF tags in my slides?</a></h3>
Most images contains some meta-data called EXIF tags that may be useful to some people.
<tt>llgal</tt> can display a table of some EXIF values under each image slide.
The name of the tags correspond to what the <tt>exiftool</tt> program uses
(see for instance <tt>exiftool --list</tt>).
<pre>
llgal --exif Aperture,FocalLength,ImageHeight,ImageWidth,FileModifyDate
</pre>
Note that <tt>--exif</tt> requires the Image::ExifTool Perl module to be installed.
<h2 class="section">Configuration</h2>
<h3 class="question"><a id="config_save_restore">How do I save/restore a configuration?</a></h3>
If you like using the same options for all your galleries and don't
want to remember the option, you may ask <tt>llgal</tt> to generate
a configuration file with:
<pre>
llgal --gencfg my_llgalrc
</pre>
This file might be used later with
<pre>
llgal --config my_llgalrc
</pre>
It may also be placed in the user llgal configuration file
<tt>$HOME/.llgal/llgalrc</tt>.
The configuration file contains a list of configuration lines.
All command line options, and even much more, are available by
this way.
It is possible to pass any configuration option on the
command line with <tt>--option</tt>.
For instance, to set which file extensions <tt>llgal</tt> will
match to find movies, use:
<pre>
llgal --option 'movie_extensions="mpe?g|avi|mov|ogm"'
</pre>
<h2 class="section">Multiple directories and subdirectories</h2>
<h3 class="question"><a id="subdirs_include">How do I include several subdirectories in a unique gallery?</a></h3>
If your photos are organized in several subdirectories of the working directory,
you can use <tt>-P</tt> to take the photos from them instead of from the working
directory.
<pre>
llgal -P subdir1 -P subdir2 -P subdir3
</pre>
If you want these subdirectories to appear as sections, <tt>llgal</tt> can generate
a horizontal line between each subdirectory and add a title in the index with <tt>--Ps</tt>.
Additionally, <tt>llgal</tt> can display the title as regular text in the index instead
of a text thumbnail with <tt>-L</tt>.
<pre>
llgal -P subdir1 -P subdir2 -P subdir3 --Ps -L
</pre>
As usual, these horizontal lines and titles are generated as TXT and LINE entries
are processed from the captions file. Thus, you may start by creating a captions file,
edit it and then generate the gallery.
<pre>
llgal -P subdir1 -P subdir2 -P subdir3 --Ps --gc
vi .llgal/captions
llgal -L
</pre>
<h3 class="question"><a id="subdirs_include_all">How do I include all subdirectories in a unique gallery?</a></h3>
Instead of passing <tt>-P</tt> for each subdirectory, you may ask
<tt>llgal</tt> to include all images from all subdirectories.
<pre>
llgal --Pall
</pre>
<h3 class="question"><a id="subdirs_add">How do I add a new subdirectory contents to a gallery?</a></h3>
You may a the list of files of a subdirectory to an existing gallery if its
captions file if available, by regenerating it:
<pre>
llgal -P newsubdir --gc
</pre>
The directory contents is added at the end of the captions file, which may
be reordered by the user.
The gallery may then be regenerated from the new captions file by re-running
<tt>llgal</tt>.
<h3 class="question"><a id="subdirs_recursive">How do I create multiple subgalleries at once?</a></h3>
If your directory contains subdirectories, you might use <tt>-S</tt>
to create slides linking to these subgalleries.
With <tt>-R</tt>, the subgalleries will even be generated right after
the main gallery.
The list of subgalleries might be changed by modifying <tt>DIR:</tt>
entries in the captions file.
<h3 class="question"><a id="subdirs_modify_single">How do I modify a single gallery in a set of subgalleries?</a></h3>
Galleries that were created recursively (with <tt>-R</tt>) may be
linked with their parents, children and brothers.
If you plan to regenerate some galleries independently, you should
take care of saving the configuration with <tt>--gencfg</tt> or
generating a captions file.
All linking information is stored inside these files.
Regeneration is then easy (with <tt>--config</tt> in the first case).
<h3 class="question"><a id="subdirs_text_menu">How do I create a text menu linking to multiple galleries?</a></h3>
Assuming you have a main directory containing multiple subdirectories where you
<b>already</b> created sub-galleries, you may do:
<pre>
llgal -L -s
</pre>
Using <tt>-L</tt> will create text links instead of thumbnails linking to sub-galleries,
while <tt>-s</tt> will avoid any slide to be created.
<br />
As you may want slides in the sub-galleries, adding <tt>-R</tt> is not recommended here
since <tt>-s</tt> would remove slides from both the main gallery and the sub-galleries.
If you need <tt>-R</tt> anyway, you may for instance avoid this problem by dropping
<tt>-s</tt> on the command and inserting <tt>make_no_slides=1</tt> in the main gallery
configuration file (<tt>.llgal/llgalrc</tt>).
Since the local configuration file is used for the local gallery and not for
sub-galleries (even with <tt>-R</tt>), <tt>make_no_slides=1</tt> won't
affect sub-galleries.
<h2 class="section">Miscellaneous</h2>
<h3 class="question"><a id="misc_accesskey">How do I add keyboard shortcuts to my gallery?</a></h3>
The HTML accesskey feature may be use to navigate in <tt>llgal</tt>'s
galleries with keyboard shortcuts. But as this feature is very browser
dependant and might conflict with some regular shortcuts in certain
browsers, it is not enabled by default in <tt>llgal</tt>.
Access keys can be configured by changing the templates and adding
<tt>accesskey=<letter></tt> to links.
For instance, changing the <tt>slidetemplate.html</tt> code to the
following one will define <tt>p</tt>, <tt>n</tt> and <tt>i</tt> as
accesskeys to previous slide, next slide and return to the index.
It means that <tt>Alt+p</tt>, <tt>Alt+n</tt> and <tt>Alt+i</tt> will
be the actual shortcuts in Mozilla Firefox.
<pre>
<a href="<!--PREV-SLIDE-->" accesskey=p><!--PREV-SLIDE-LINK-TEXT--></a>
&nbsp; &nbsp; &nbsp;
<a href="<!--INDEX-FILE-->" accesskey=i><!--INDEX-LINK-TEXT--></a>
&nbsp; &nbsp; &nbsp;
<a href="<!--NEXT-SLIDE-->" accesskey=n><!--NEXT-SLIDE-LINK-TEXT--></a>
</pre>
Note that the slide template might be modified by getting a copy with
in the local or user-wide configuration directory using <tt>--gt</tt>.
<h3 class="question"><a id="misc_erase_captions">How do I prevent llgal from erasing my captions file?</a></h3>
<tt>llgal --clean</tt> erases all files that have not been modified regarding to their
original template. The <tt>captions</tt> file does not have a template, so <tt>llgal</tt>
will only erase it if it contains the following line:
<pre>
# REMOVE THIS LINE IF LLGAL SHOULD NOT REMOVE THIS FILE
</pre>
When the user generates the <tt>captions</tt> file himself, he is not supposed
to add this line, which means <tt>llgal</tt> won't erase the file.
But, when the captions are generated with <tt>llgal --gc</tt>, this line will be added
automatically. Hence, if the user modifies the <tt>captions</tt> file, he should start
by removing this line first to protect his modifications from future erasing.
<br />
Note that <tt>llgal --cleanall</tt> erases ALL files, even if you kept the above line
in the <tt>captions</tt> file.
<h3 class="question"><a id="misc_dynamic_comments">How do I let people add comments to my slides dynamically?</a></h3>
The <tt>--php</tt> option of <tt>llgal</tt> enables generation of PHP slides
instead of HTML. By default, no PHP code is inserted. But, you may change the
templates to add some PHP code to do whatever you want, including handle
dynamic comments that people may add to your slides.
<tt>llgal</tt> comes with some examples, including the directory
<tt>dynamic_comments_in_slides/</tt> which gives a quick and dirty example to do so.
<h3 class="question"><a id="misc_slow">Why is llgal so slow?</a></h3>
<tt>llgal</tt> uses <tt>ImageMagick</tt> (and especially <tt>convert</tt>) to generate
thumbnails (and scaled images if <tt>--sx</tt> or <tt>--sy</tt> was passed). It can be
pretty long if you have lots of large images.
To avoid being slow everytime you re-run <tt>llgal</tt>, thumbnails and scaled images
are only generated once
(except when the original has been modified since or when <tt>-f</tt> is passed, see
<a href="#layout_image_size"><em>Why does llgal ignore the image dimension limits that I give?</em></a>).
There might be some way to improve the overall speed of thumbnails and scaled images
generation by changing the corresponding command line with <tt>scaled_create_command</tt>
and <tt>thumbnail_create_command</tt> in the configuration file. You may for instance use
another conversion program which is more optimized than <tt>ImageMagick</tt> to process
your specific images.
See tweak_image_generation.txt in the examples in the documentation for details.
<h3 class="question"><a id="misc_rotate">Why does llgal not provide any feature to rotate or modify images?</a></h3>
<tt>llgal</tt> is only a gallery generator. Adding features to rotate images (for instance
using Exif tags) or modify images (for instance to apply some filters) would open the door
for thousands of options that <tt>llgal</tt> does not really require (and the command line
interface is already pretty complex). We prefer keeping those features in other softwares
that the user runs before using <tt>llgal</tt>. Also, there is no technical reason to
include such filters in <tt>llgal</tt>. Applying them with another specialized software
before generating the gallery is as easy, and such software will always provide more features
than <tt>llgal</tt>.
<h3 class="question"><a id="misc_drop_originals">How do I scale my images to a smaller size and drop the originals?</a></h3>
<tt>llgal</tt> is not supposed to be used for this
(see <a href="#misc_rotate"><em>Why does llgal not provide any feature to rotate or modify images?</em></a>).
You should use an external tool earlier and then apply llgal on the scaled images.
If you really want to use <tt>llgal</tt> to scale images down, you should use <tt>--sx</tt>
and/or <tt>--sy</tt>. The scaled images will be placed in <tt>.llgal/scaled_*</tt>.
To drop the originals and use the scaled images directly, you should first remove the
originals from the main directory. Then move the scaled images from <tt>.llgal</tt> to
the main directory and remove the <tt>scaled_</tt> suffix
(<tt>rename 's@^\.llgal/scaled_@@' .llgal/scaled_*</tt> should do the trick).
Finally, re-run the same <tt>llgal</tt> command line without <tt>--sx</tt> and/or
<tt>--sy</tt>.
You should get the same gallery as before, without the links from the slides to the
original images.
</div>
<hr />
<address id="addr">
The <a href="mailto:llgal AT googlegroups.com">llgal team</a>.
</address>
<div id="modif">
$Id: howto.html,v 1.1 2006/05/07 00:46:01 bgoglin Exp $
</div>
</body>
</html>
|