File: Section_3.html

package info (click to toggle)
album 4.15-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, buster, stretch
  • size: 3,332 kB
  • ctags: 868
  • sloc: perl: 5,488; makefile: 2
file content (666 lines) | stat: -rw-r--r-- 31,259 bytes parent folder | download | duplicates (2)
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
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
	<meta http-equiv='Content-Language' content='en'>
	<link rel='alternate' type='text/html' href='de/Section_3.html' hreflang='de' lang='de' title='album documentation'>
	<link rel='alternate' type='text/html' href='es/Section_3.html' hreflang='es' lang='es' title='album documentation'>
	<link rel='alternate' type='text/html' href='fr/Section_3.html' hreflang='fr' lang='fr' title='album documentation'>
	<link rel='alternate' type='text/html' href='nl/Section_3.html' hreflang='nl' lang='nl' title='album documentation'>
	<link rel='alternate' type='text/html' href='ru/Section_3.html' hreflang='ru' lang='ru' title='album documentation'>
	<link rel='alternate' type='text/html' href='it/Section_3.html' hreflang='it' lang='it' title='album documentation'>
	<link rel='alternate' type='text/html' href='hu/Section_3.html' hreflang='hu' lang='hu' title='album documentation'>


  <title>MarginalHacks album - Running album / Basic Options
 - Documentation</title>

  <link rel='shortcut icon' HREF='/favicon.ico' type='image/x-gif'>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <style>
  <!--
  code {color: red;}
  tt {color: #ff6666;}
  A:hover {background-color: yellow;}
  -->
  </style>
  <script language='JavaScript'>
  <!--
  ver4 = (document.layers || document.all) ? 1 : 0;

  if (document.images) {
    ImageArray = new Array (
      'http://DavePics.com/Domains/MarginalHacks.gif',
      'http://DavePics.com/Domains/MarginalHacks_down.gif',
      'http://DavePics.com/Domains/GetDave.gif',
      'http://DavePics.com/Domains/GetDave_down.gif',
      'http://DavePics.com/Domains/Daveola.gif',
      'http://DavePics.com/Domains/Daveola_down.gif',
      'http://DavePics.com/Domains/DaveSource.gif',
      'http://DavePics.com/Domains/DaveSource_down.gif' )

    ImageList = new Array ();
    for (counter in ImageArray) {
      ImageList[counter] = new Image();
      ImageList[counter].src = ImageArray[counter];
    }
  };
  defaultStatus = 'Marginal Hacks'

  //-->
  </script>
</head>

<body bgcolor=white link='#0000FF' alink='#0000FF' vlink='#5000FF' text='#000000'>

<div lang='en'>
<center>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
  <tr> <td rowspan=2>
      <a href='http://MarginalHacks.com/'
         onMouseOver = document.images['MarginalHacks'].src='http://DavePics.com/Domains/MarginalHacks_down.gif'
          onMouseOut = document.images['MarginalHacks'].src='http://DavePics.com/Domains/MarginalHacks.gif'
         onMouseDown = document.images['MarginalHacks'].src='http://DavePics.com/Domains/MarginalHacks_down.gif'
           onMouseUp = document.images['MarginalHacks'].src='http://DavePics.com/Domains/MarginalHacks.gif'>
      <img name=MarginalHacks alt='MarginalHacks.com'
           src='http://DavePics.com/Domains/MarginalHacks.gif'
           width=69 height=60 border=0></a>
      <a href='http://DaveSource.com/'
         onMouseOver = document.images['DaveSource'].src='http://DavePics.com/Domains/DaveSource_down.gif'
          onMouseOut = document.images['DaveSource'].src='http://DavePics.com/Domains/DaveSource.gif'
         onMouseDown = document.images['DaveSource'].src='http://DavePics.com/Domains/DaveSource_down.gif'
           onMouseUp = document.images['DaveSource'].src='http://DavePics.com/Domains/DaveSource.gif'>
      <img name=DaveSource alt='DaveSource.com'
           src='http://DavePics.com/Domains/DaveSource.gif'
           width=69 height=60 border=0></a>
      <a href='http://GetDave.com/'
         onMouseOver = document.images['GetDave'].src='http://DavePics.com/Domains/GetDave_down.gif'
          onMouseOut = document.images['GetDave'].src='http://DavePics.com/Domains/GetDave.gif'
         onMouseDown = document.images['GetDave'].src='http://DavePics.com/Domains/GetDave_down.gif'
           onMouseUp = document.images['GetDave'].src='http://DavePics.com/Domains/GetDave.gif'>
      <img name=GetDave alt='GetDave.com - all the current Dave Pointers.'
           src='http://DavePics.com/Domains/GetDave.gif'
           width=69 height=60 border=0></a>
      <a href='http://Daveola.com/'
         onMouseOver = document.images['Daveola'].src='http://DavePics.com/Domains/Daveola_down.gif'
          onMouseOut = document.images['Daveola'].src='http://DavePics.com/Domains/Daveola.gif'
         onMouseDown = document.images['Daveola'].src='http://DavePics.com/Domains/Daveola_down.gif'
           onMouseUp = document.images['Daveola'].src='http://DavePics.com/Domains/Daveola.gif'>
      <img name=Daveola alt='Daveola.com - My home.'
           src='http://DavePics.com/Domains/Daveola.gif'
           width=69 height=60 border=0></a>
  </td>
  <td bgcolor=#000000 align=right>
  <font size=+2 face='lucida, helvetica' color=#ccccc0>
    A&nbsp;l&nbsp;b&nbsp;u&nbsp;m&nbsp;<br>

    T&nbsp;h&nbsp;r&nbsp;e&nbsp;e&nbsp; &nbsp;-&nbsp;-&nbsp; &nbsp;R&nbsp;u&nbsp;n&nbsp;n&nbsp;i&nbsp;n&nbsp;g&nbsp; &nbsp;a&nbsp;l&nbsp;b&nbsp;u&nbsp;m&nbsp; &nbsp;/&nbsp; &nbsp;B&nbsp;a&nbsp;s&nbsp;i&nbsp;c&nbsp; &nbsp;O&nbsp;p&nbsp;t&nbsp;i&nbsp;o&nbsp;n&nbsp;s&nbsp;
<br>

  </font>
  </td></tr>
	<tr height=16>
		<td height=16 align=right>
			<a href="http://del.icio.us/post?url=http://MarginalHacks.com/Hacks/album/&amp;title=Marginal+Hacks+Photo+Album+Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Del.icio.us"><img src="/Bookmarks/delicious.gif" title="Add 'Marginal Hacks Photo Album Generator' to Del.icio.us" alt="Add 'Marginal Hacks Photo Album Generator' to Del.icio.us" border="0"></a>
			<a href="http://digg.com/software/Marginal_Hacks_Photo_Album_Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Digg 'Marginal Hacks Photo Album Generator'"><img src="/Bookmarks/digg.gif" title="Digg 'Marginal Hacks Photo Album Generator'" alt="Digg 'Marginal Hacks Photo Album Generator'" border="0"></a>
			<a href="http://furl.net/storeIt.jsp?t=Marginal+Hacks+Photo+Album+Generator&amp;u=http://MarginalHacks.com/Hacks/album/" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to FURL"><img src="/Bookmarks/furl.gif" title="Add 'Marginal Hacks Photo Album Generator' to FURL" alt="Add 'Marginal Hacks Photo Album Generator' to FURL" border="0"></a>
			<a href="http://reddit.com/submit?url=http://MarginalHacks.com/Hacks/album/&amp;title=Marginal+Hacks+Photo+Album+Generato" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to reddit"><img src="/Bookmarks/reddit.gif" title="Add 'Marginal Hacks Photo Album Generator' to reddit" alt="Add 'Marginal Hacks Photo Album Generator' to reddit" border="0"></a>
			<a href="http://www.stumbleupon.com/refer.php?url=http://MarginalHacks.com/Hacks/album/&amp;title=Marginal+Hacks+Photo+Album+Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Stumble Upon"><img src="/Bookmarks/stumbleupon.gif" title="Add 'Marginal Hacks Photo Album Generator' to Stumble Upon" alt="Add 'Marginal Hacks Photo Album Generator' to Stumble Upon" border="0"></a>
			<a href="http://www.technorati.com/faves?add=http://MarginalHacks.com/Hacks/album/" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Technorati"><img src="/Bookmarks/technorati.gif" title="Add 'Marginal Hacks Photo Album Generator' to Technorati" alt="Add 'Marginal Hacks Photo Album Generator' to Technorati" border="0"></a>
			<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://MarginalHacks.com/Hacks/album/&amp;t=Marginal+Hacks+Photo+Album+Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Yahoo My Web"><img src="/Bookmarks/myweb2.gif" title="Add 'Marginal Hacks Photo Album Generator' to Yahoo My Web" alt="Add 'Marginal Hacks Photo Album Generator' to Yahoo My Web" border="0"></a>
			<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://MarginalHacks.com/Hacks/album/&amp;title=Marginal+Hacks+Photo+Album+Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Google Bookmarks"><img src="/Bookmarks/google.gif" title="Add 'Marginal Hacks Photo Album Generator' to Google Bookmarks" alt="Add 'Marginal Hacks Photo Album Generator' to Google Bookmarks" border="0"></a>
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://MarginalHacks.com/Hacks/album/" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Squidoo"><img src="/Bookmarks/squidoo.gif" title="Add 'Marginal Hacks Photo Album Generator' to Squidoo" alt="Add 'Marginal Hacks Photo Album Generator' to Squidoo" border="0"></a>
			<a href="http://www.spurl.net/spurl.php?url=http://MarginalHacks.com/Hacks/album/&amp;title=Marginal+Hacks+Photo+Album+Generator" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Spurl"><img src="/Bookmarks/spurl.gif" title="Add 'Marginal Hacks Photo Album Generator' to Spurl" alt="Add 'Marginal Hacks Photo Album Generator' to Spurl" border="0"></a>
			<a href="http://www.bloglines.com/sub/http://MarginalHacks.com/Hacks/album/" class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Add 'Marginal Hacks Photo Album Generator' to Bloglines"><img src="/Bookmarks/bloglines.gif" title="Add 'Marginal Hacks Photo Album Generator' to Bloglines" alt="Add 'Marginal Hacks Photo Album Generator' to Bloglines" border="0"></a>
 	 </td>
	</tr>
</table>

<a name=top>

<table cellpadding=8 width='100%'> <tr>
  <td valign=top>
    <table>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/'>Home</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Themes.html'>Themes/Examples</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Languages.html'>Languages</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Plugins.html'>Plugins</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/License.html'>License</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Download.html'>Download</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3>Documentation
          <font size='-1'>
<br><span lang='en'>&nbsp;&nbsp; <img src="flag.png"> &nbsp;&nbsp;English</span>
<br><span lang='de'>&nbsp;&nbsp; <img src="de/flag.png"> &nbsp;&nbsp;<a href="de">Deutsch</a></span>
<br><span lang='es'>&nbsp;&nbsp; <img src="es/flag.png"> &nbsp;&nbsp;<a href="es">Español</a></span>
<br><span lang='fr'>&nbsp;&nbsp; <img src="fr/flag.png"> &nbsp;&nbsp;<a href="fr">Français</a></span>
<br><span lang='nl'>&nbsp;&nbsp; <img src="nl/flag.png"> &nbsp;&nbsp;<a href="nl">Nederlands</a></span>
<br><span lang='ru'>&nbsp;&nbsp; <img src="ru/flag.png"> &nbsp;&nbsp;<a href="ru">Русский</a></span>
<br><span lang='it'>&nbsp;&nbsp; <img src="it/flag.png"> &nbsp;&nbsp;<a href="it">Italiano</a></span>
<br><span lang='hu'>&nbsp;&nbsp; <img src="hu/flag.png"> &nbsp;&nbsp;<a href="hu">magyar</a></span>

          </font>
</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Mailing_List.html'>Mailing List</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/CHANGELOG.html'>CHANGELOG</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href='http://MarginalHacks.com/Hacks/album/Praises.html'>Praises</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
      <tr bgcolor=#BBBBBB><td>
        <h3><a href=/Contact/>Contact</a>&nbsp;&nbsp;</h3>
        <p>
      </td></tr>
    </table>
  </td>
  <td valign=top>



<p><hr><p>
<a href='.'>Table Of Contents</a>
<ol><li> <a href='#Basic_execution'>Basic execution</a>
 <li> <a href='#Options'>Options</a>
 <li> <a href='#Themes'>Themes</a>
 <li> <a href='#Sub-albums'>Sub-albums</a>
 <li> <a href='#Avoiding_Thumbnail_Regeneration'>Avoiding Thumbnail Regeneration</a>
 <li> <a href='#Cleaning_Out_The_Thumbnails'>Cleaning Out The Thumbnails</a>
 <li> <a href='#Medium_size_images'>Medium size images</a>
 <li> <a href='#Captions'>Captions</a>
 <li> <a href='#EXIF_Captions'>EXIF Captions</a>
 <li> <a href='#Headers_and_Footers'>Headers and Footers</a>
 <li> <a href='#Hiding_Files_Directories'>Hiding Files/Directories</a>
 <li> <a href='#Cropping_Images'>Cropping Images</a>
 <li> <a href='#Video'>Video</a>
 <li> <a href='#Burning_CDs_(using_file:__)'>Burning CDs (using file://)</a>
 <li> <a href='#Indexing_your_entire_album'>Indexing your entire album</a>
 <li> <a href='#Updating_Albums_With_CGI'>Updating Albums With CGI</a>
</ol><p><hr><p>


<pre>

<b><a name='Basic_execution'>1:</a>   Basic execution</b>

Create a directory with nothing but images in it.  The album script and
other tools should not go here.  Then run album specifying that directory:

<code>% album /example/path/to/images/</code>

Or, if you're in the /example/path/to directory:

<code>% album images/</code>

When it's done, you'll have a photo album inside that directory starting
with images/index.html.

If that path is in your web server, then you can view it with your
browser.  If you can't find it, talk to your sysadmin.

<b><a name='Options'>2:</a>   Options</b>
There are three types of options.  Boolean options, string/num options
and array options.  Boolean options can be turned off by prepending -no_:

<code>% album -no_image_pages</code>

String and number values are specified after a string option:

<code>% album -type gif
% album -columns 5</code>

Array options can be specified two ways, with one argument at a time:

<code>% album -exif hi -exif there</code>

Or multiple arguments using the '--' form:

<code>% album --exif hi there --</code>

You can remove specific array options with -no_&lt;option&gt;
and clear all the array options with -clear_&lt;option&gt;.
To clear out array options (say, from the previous album run):

<code>% album -clear_exif -exif "new exif"</code>

(The -clear_exif will clear any previous exif settings and then the
 following -exif option will add a new exif comment)

And finally, you can remove specific array options with 'no_':

<code>% album -no_exif hi</code>

Which could remove the 'hi' exif value and leave the 'there' value intact.

Also see the section on <a href='Section_4.html#Saving_Options'>Saving Options</a>.

To see a brief usage:

<code>% album -h</code>

To see more options:

<code>% album -more</code>

And even more full list of options:

<code>% album -usage=2</code>

You can specify numbers higher than 2 to see even more options (up to about 100)

Plugins can also <a href="Section_7.html#Plugin_Options">have options</a> with their own usage.


<b><a name='Themes'>3:</a>   Themes</b>

Themes are an essential part of what makes album compelling.
You can customize the look of your photo album by downloading a
theme from MarginalHacks or even writing your own theme to match
your website.

To use a theme, download the theme .tar or .zip and unpack it.

Themes are found according to the -theme_path setting, which is
a list of places to look for themes.  Those paths need to be somewhere
under the top of your web directory, but not inside a photo album
directory.  It needs to be accessible from a web browser.

You can either move the theme into one of the theme_paths that album
is already using, or make a new one and specify it with the -theme_path
option.  (-theme_path should point to the directory the theme is in,
not the actual theme directory itself)

Then call album with the -theme option, with or without -theme_path:

<code>% album -theme Dominatrix6 my_photos/
% album -theme Dominatrix6 -theme_path /home/httpd/album/Themes/ my_photos/
</code>

You can also create your own themes pretty easily, this is covered
later in this documentation.

<b><a name='Sub-albums'>4:</a>   Sub-albums</b>

Make directories inside your first directory and put images in that.
Run album again, and it will run through all the child directories
and create sub-albums of the first album.

If you make changes to just a sub-album, you can run album on that
and it will keep track of all the parent links.

If you don't want to traverse down the tree of directories, you
can limit it with the depth option.  Example:

<code>% album images/ -depth 1</code>

Will only generate photo albums for the images directory.

If you have many sub-albums, and you want to add a new sub-album
without regenerating all the previous sub-albums, then you can use -add:

<code>% album -add images/new_album/</code>

Which will add the new_album to the HTML for 'images/' and then
generate the thumbs and HTML for everything inside 'images/new_album/'

<b><a name='Avoiding_Thumbnail_Regeneration'>5:</a>   Avoiding Thumbnail Regeneration</b>

album tries to avoid unnecessary work.  It only creates thumbnails if
they don't exist and haven't changed.  This speeds up successive runs
of album.

This can cause a problem if you change the size or cropping of your
thumbnails, because album won't realize that the thumbnails have changed.
You can use the force option to force album to regenerate thumbnails:

<code>% album -force images/</code>

But you shouldn't need to use -force every time.

<b><a name='Cleaning_Out_The_Thumbnails'>6:</a>   Cleaning Out The Thumbnails</b>

If you remove images from an album then you'll have leftover thumbs and HTML.
You can remove them by running album once with the -clean option:

<code>% album -clean images/</code>

<b><a name='Medium_size_images'>7:</a>   Medium size images</b>

When you click on an album thumbnail you're taken to an 'image_page.'
The image_page shows, by default, the full size image (as well as
navigation buttons and captions and such).  When you click on the
image on the image_page, you'll be taken to the URL for just the full
size image.

If you want a medium size image on the image_page, use the -medium
option and specify a geometry for the medium size image.  You can
specify any geometry that ImageMagick can use (see their man page
for more info).  Some examples:

# An image that is half the full size
<code>% album -medium 50%</code>

# An image that fits inside 640x480 (maximum size)
<code>% album -medium 640x480</code>

# An image that is shrunk to fit inside 640x480
# (but won't be enlarged if it's smaller than 640x480)
<code>% album -medium '640x480>'</code>

You need the 'quotes' on the last example with most shells because
of the '>' character.

<b><a name='Captions'>8:</a>   Captions</b>

Images and thumbnails can have names and captions.  There are a number
of ways to specify/change names and captions in your photo albums.

<img src='Pics/Caption.gif' alt='caption example' align='left'>The name is linked to the image or image_page,
and the caption follows underneath.

The default name is the filename cleaned up:
  "Kodi_Cow.gif"  =>  "Kodi Cow"

One way to specify a caption is in a .txt file
with the same name as the image.  For this example,
"Kodi_Cow.txt" could contain <tt>"Kodi takes down a cow!"</tt>

You can rename your images and specify captions in bulk
for an album directory with a <i>captions.txt</i> file.

Each line of the file should be an image <b>or directory</b> filename,
followed by <b>a tab</b>, followed by the new name.  You can also 
specify (separated by tabs), an optional caption and then an optional 
image ALT tag.  (To skip a field, use 'tab' 'space' 'tab')

Example:

<tt>001.gif	My first photo
002.gif	Mom and Dad My parents in the grand canyon
003.gif	Ani DiFranco	My fiancee	Yowsers!</tt>

The images and directories will also be sorted in the order they are found
in the caption file.  You can override this with '-sort date' and '-sort name'

If your editor doesn't handle tabs very well, then you can separate the
fields by double-colons, but <b>only</b> if the caption line doesn't contain any
tabs at all:

<tt>003.gif :: Ani DiFranco :: My fiancee :: Yowsers!</tt>

If you only want captions on image pages (not on album pages) use:

<code>% album -no_album_captions</code>

If you want web access to create/edit your captions, look at the
<a href='http://MarginalHacks.com/Hacks/album/tools/cgi/caption_edit'>caption_edit.cgi</a> CGI script (but be sure to limit access to the
script or anyone can change your captions!)

<b><a name='EXIF_Captions'>9:</a>   EXIF Captions</b>

You can also specify captions that are based off of EXIF information
(Exchangeable Image File Format) which most digital cameras add to images.

First you need 'jhead' installed.  You should be able to run jhead
on a JPG file and see the comments and information.

EXIF captions are added after the normal captions and are specified with -exif:

<code>% album -exif "&lt;br&gt;File: %File name% taken with %Camera make%"</code>

Any %tags% found will be replaced with EXIF information.  If any %tags%
aren't found in the EXIF information, then that EXIF caption string is
thrown out.  Because of this you can specify multiple -exif strings:

<code>% album -exif "&lt;br&gt;File: %File name% " -exif "taken with %Camera make%"</code>

This way if the 'Camera make' isn't found you can still get the 'File name'
caption.

Like any of the array style options you can use --exif as well:

<code>% album --exif "&lt;br&gt;File: %File name% " "taken with %Camera make%" --</code>

Note that, as above, you can include HTML in your EXIF tags:

<code>% album -exif "&lt;br&gt;<font size='-1'>Aperture: %Aperture%</font>"</code>

To see the possible EXIF tags (Resolution, Date/Time, Aperture, etc..)
run a program like 'jhead' on an digital camera image.

You can also specify EXIF captions only for album or image pages, see
the -exif_album and -exif_image options.

<b><a name='Headers_and_Footers'>10:</a>  Headers and Footers</b>

In each album directory you can have text files <tt>header.txt</tt> and <tt>footer.txt</tt>
These will be copied verbatim into the header and footer of your album (if
it's supported by the theme).

<b><a name='Hiding_Files_Directories'>11:</a>  Hiding Files/Directories</b>

Any files that album does not recognize as image types are ignored.
To display these files, use -no_known_images.  (-known_images is default)

You can mark an image as a non-image by creating an empty file with
the same name with <tt>.not_img</tt> added to the end.

You can ignore a file completely by creating an empty file with
the same name with <tt>.hide_album</tt> on the end.

You can avoid running album on a directory (but still include it in your
list of directories) by creating a file <tt>&lt;dir&gt;/.no_album</tt>

You can ignore directories completely by creating a file <tt>&lt;dir&gt;/.hide_album</tt>

The Windows version of album doesn't use dots for <tt>no_album</tt>, <tt>hide_album</tt>
and <tt>not_img</tt> because it's difficult to create <tt>.files</tt> in Windows.

<b><a name='Cropping_Images'>12:</a>  Cropping Images</b>

If your images are of a large variety of aspect ratios (i.e., other than
just landscape/portrait) or if your theme only allows one orientation,
then you can have your thumbnails cropped so they all fit the same geometry:

<code>% album -crop</code>

The default cropping is to crop the image to center.  If you don't 
like the centered-cropping method that the album uses to generate 
thumbnails, you can give directives to album to specify where to crop 
specific images.  Just change the filename of the image so it has a 
cropping directive before the filetype.  You can direct album to crop 
the image at the top, bottom, left or right.  As an example, let's 
say you have a portrait "Kodi.gif" that you want cropped on top for 
the thumbnail.  Rename the file to "Kodi.CROPtop.gif" and this will 
be done for you (you might want to -clean out the old thumbnail).  
The "CROP" string will be removed from the name that is printed in 
the HTML.

The default geometry is 133x133.  This way landscape images will
create 133x100 thumbnails and portrait images will create 100x133
thumbnails.  If you are using cropping and you still want your
thumbnails to have that digital photo aspect ratio, then try 133x100:

<code>% album -crop -geometry 133x100</code>

Remember that if you change the -crop or -geometry settings on a
previously generated album, you will need to specify -force once
to regenerate all your thumbnails.

<b><a name='Video'>13:</a>  Video</b>

album can generate snapshot thumbnails of many video formats if you
install <a href='http://MarginalHacks.com/redir.cgi?ffmpeg.org/'>ffmpeg</a>

If you are running linux on an x86, then you can just grab the <a href='/bin/ffmpeg'>binary</a>,
otherwise get the whole package from <a href='http://MarginalHacks.com/redir.cgi?ffmpeg.org/'>ffmpeg.org</a> (it's an easy install).

<b><a name='Burning_CDs_(using_file:__)'>14:</a>  Burning CDs (using file://)</b>

If you are using album to burn CDs or you want to access your albums with
file://, then you don't want album to assume "index.html" as the default
index page since the browser probably won't.  Furthermore, if you use
themes, you <b>must</b> use relative paths.  You can't use -theme_url because
you don't know what the final URL will be.  On Windows the theme path
could end up being "C:/Themes" or on UNIX or OSX it could be something
like "/mnt/cd/Themes" - it all depends on where the CD is mounted.
To deal with this, use the -burn option:

  % album -burn ...

This requires that the paths from the album to the theme don't change.
The best way to do this is take the top directory that you're going to
burn and put the themes and the album in that directory, then specify
the full path to the theme.  For example, create the directories:

  myISO/Photos/
  myISO/Themes/Blue

Then you can run:

  % album -burn -theme myISO/Themes/Blue myISO/Photos

Then you can make a CD image from the myISO directory (or higher).

If you are using 'galbum' (the GUI front end) then you can't specify
the full path to the theme, so you'll need to make sure that the version
of the theme you want to burn is the first one found in the theme_path
(which is likely based off the data_path).  In the above example you
could add 'myISO' to the <b>top</b> of the data_path, and it should
use the 'myISO/Themes/Blue' path for the Blue theme.

You can also look at <a href='http://MarginalHacks.com/redir.cgi?www.squirrel.nl/people/jvromans/software/sw_shellrun.html'>shellrun</a> for windows users, you can have it
automatically launch the album in a browser.  (Or see <a href='http://MarginalHacks.com/redir.cgi?duckware.com/winopen/'>winopen</a>)

<b><a name='Indexing_your_entire_album'>15:</a>  Indexing your entire album</b>
To navigate an entire album on one page use the <a href='http://MarginalHacks.com/Hacks/album/tools/caption_index'>caption_index</a> tool.
It uses the same options as album (though it ignores many
of them) so you can just replace your call to "album" with "caption_index"

The output is the HTML for a full album index.

See an <a href='http://DavePics.com/Examples/Blue_Index.html'>example index</a>
for one of my <a href='http://DavePics.com/Examples/Blue.html'>example photo albums</a>

<b><a name='Updating_Albums_With_CGI'>16:</a>  Updating Albums With CGI</b>

First you need to be able to upload the photo to the album directory.
I suggest using ftp for this.  You could also write a javascript that
can upload files, if someone could show me how to do this I'd love to know.

Then you need to be able to remotely run album.  To avoid abuse, I
suggest setting up a CGI script that touches a file (or they can just
ftp this file in), and then have a cron job that checks for that
file every few minutes, and if it finds it it removes it and runs album.
[unix only]  (You will probably need to set $PATH or use absolute paths
in the script for convert)

If you want immediate gratification, you can run album from a CGI script
such as this <a href='http://MarginalHacks.com/Hacks/album/tools/cgi/run_album'>one.</a>

If your photos are not owned by the webserver user, then you
need to run through a setud script which you run from a CGI [unix only].
Put the setuid script in a secure place, change it's ownership to be the
same as the photos, and then run "chmod ug+s" on it.  Here are example
<a href='http://MarginalHacks.com/Hacks/album/tools/cgi/run_setuid_album'>setuid</a> and <a href='http://MarginalHacks.com/Hacks/album/tools/cgi/setuid_album'>CGI</a> scripts.  Be sure to edit them.

Also look at <a href='http://MarginalHacks.com/Hacks/album/tools/cgi/caption_edit'>caption_edit.cgi</a> which allows you (or others) to edit
captions/names/headers/footers through the web.


</pre>
<p><font size='-1'><li> Created by <a href='http://MarginalHacks.com/Hacks/make_faq/'>make_faq</a> from <a href='http://MarginalHacks.com/'>Marginal Hacks</a></font><p>
    </td>
  </tr>
</table>
</div>

</body>
</html>
<pre>

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |

     ^
     |
</pre>