Package: igal Version: 1.4-13 Severity: wishlist Tags: patch Some of my albums have descriptive slide names and very long captions. For these, I wanted to have the slide name under each thumbnail on the index page.
The attached patch adds a new option, -U, which will do this. It's based on the existing "-u" option which puts the full captions on the front page. Line numbers may not match your copy, as I have a couple of other fixes I'm working on. -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (60, 'testing'), (2, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.11-1-k7 Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1) Versions of packages igal depends on: ii imagemagick 6:6.0.6.2-2.4 Image manipulation programs ii libimage-size-perl 2.992-1 determine the size of images in se ii liburi-perl 1.35-1 Manipulates and accesses URI strin ii perl 5.8.4-8 Larry Wall's Practical Extraction -- no debconf information
diff -urw igal.orig igal --- igal.orig 2005-10-24 12:15:31.000000000 +0100 +++ igal 2005-10-24 14:40:35.000000000 +0100 @@ -91,6 +91,7 @@ $opt_s = "0"; # -s to make no slides, just thumbnail links to images $opt_t = "21"; # height of the .tile.png tiled image $opt_u = "0"; # write captions under thumbnails on index page +$opt_U = "0"; # write image names under thumbnails on index page $opt_w = "5"; # index rows are at most 5 images wide by default $opt_x = "0"; # -x to omit the image count from the caption $opt_y = "0"; # max height of a thumbnail (defaults to 75 below) @@ -124,6 +125,7 @@ -s make no HTML slides, link thumbnails to images -t <n> height of the film reel tiled image (21) -u write captions under thumbnails on index page + -U write slide names under thumbnails on index page -w <n> rows in thumbnail index are at most <n> images wide (5) -x omit the image count from the captions -y <n> scale all thumbnails to the same height <n> (75) @@ -150,7 +152,7 @@ # process command-line arguments (overriding defaults above) GetOptions('a','c','C','d=s','f','h','i=s','k','n','p=i', - 'r','s','t=i','u','w=i','x','y=i','ad','as','bigy=i', + 'r','s','t=i','u','U','w=i','x','y=i','ad','as','bigy=i', 'con=s','help','im','www','wx=i','xy=i','clean','title=s', 'tp=s','sp=s') or die "$usage"; @@ -221,6 +223,7 @@ # Store image extensions, fix problematic filenames and complain @imgext = (); @captions = (); my @safenames; +my @imgnames; my $warned; foreach $file (@imgfiles) { @@ -242,6 +245,7 @@ $temp = $file; $temp =~ m/(^.*)\.(\w{3,4})$/; push(@captions, $1); + push(@imgnames, $1); push(@imgext, $2); } @@ -266,6 +270,7 @@ # read in files specified in the .captions file open(CAP,"$opt_d/$captionfile") or die "Can't open $opt_d/$captionfile file\n"; @imgfiles = (); # reset arrays b/c we're rereading them + @imgnames = (); @safenames = (); @captions = (); @imgext = (); $njpg = 0; print "Reading the $captionfile file ... "; @@ -279,6 +284,8 @@ push(@imgfiles,$arr[0]); push(@imgext, $temp); push(@arr,"") if (scalar @arr == 1); + $temp = $arr[0]; $temp =~ s/\.[^.]+$//; + push @imgnames,$temp; push(@captions,$arr[1]); $njpg++ if ($arr[0] =~ m/jpe?g/i); # az fixme: i hate duplication, but i do not want to @@ -667,11 +674,13 @@ print IXW " </TR>\n"; } # write image captions under images if option -u is given - if ($opt_u) { + if ($opt_u || $opt_U) { print IXW " <TR>\n"; print IXW "<TD> </TD>\n" unless ($opt_r); for ($j = 0; $j < $num; $j++) { - print IXW " <TD>$captions[$i+$j]</TD>\n"; + print IXW " <TD>" . + ( $opt_U ? $imgnames[$i+$j] : $captions[$i+$j] ) + . "</TD>\n"; } print IXW " </TR>\n"; } diff -urw igal.1.orig igal.1 --- igal.1.orig 2005-10-24 12:15:31.000000000 +0100 +++ igal.1 2005-10-24 14:47:33.000000000 +0100 @@ -188,6 +188,10 @@ file (see options -c or -C) then the captions are read from there, else the file names are used (but the file extension is stripped). .TP +.BI -U +Write image filenames under each thumbnail on the index page +(but the file extension is stripped). This option overrides option -u. +.TP .BI -w " <n>" Set the thumbnail rows to be .I <n>