Package: llgal
Version: 0.13.16-3
Severity: wishlist
Tags: patch
Dear Brice,
The attached patch below makes image captions clickable.
So visitor can reach an external URL related to the picture.
E.g. a satellite image or Wikipedia article.
The new format of caption entry is:
IMG: <filename> ---- <caption> [---- <url>]
If you agree I would add support for HTML "title" attribute also
in order to see some comment in the bubble when pointer
is over the caption. E.g. <url> could be formed as
"title text":http:/foo.bar/foobar
that is easy to parse and title text would be stored
in $entry->{captiontitle}.
Cheers
Gabor
-- System Information:
Debian Release: 6.0.4
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-updates'), (500,
'proposed-updates')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages llgal depends on:
ii imagemagick 8:6.6.0.4-3 image manipulation programs
ii libimage-size-perl 3.221-1 module for determining image sizes
ii liblocale-gettext-perl 1.05-6 Using libc functions for internati
ii liburi-perl 1.54-2 module to manipulate and access UR
ii perl 5.10.1-17squeeze3 Larry Wall's Practical Extraction
Versions of packages llgal recommends:
ii libimage-exiftool-perl 8.15-1 Library and program to read and wr
llgal suggests no packages.
-- no debconf information
--- llgal.orig 2010-07-03 18:21:06.000000000 +0200
+++ llgal 2012-02-11 09:49:36.262266804 +0100
@@ -1334,7 +1334,9 @@
my $type = $entry->{type} ;
if ($type == $TYPE_IMAGE) {
print CAP "IMG: ". $entry->{filename}
- ." ---- ". $entry->{caption} ."\n"
+ ." ---- ". $entry->{caption}
+ . $entry->{linktext} ? " ---- $entry->{linktext}" : ''
+ ."\n"
unless grep { $captions[$_] =~ m/^(\s*IMG:)?\s*$entry->{filename}\s+----\s/ }
( 0 .. $#captions ) ;
@@ -1477,10 +1479,10 @@
# thumbnail row break
$entry = create_nofile_entry ($TYPE_BREAK, undef, undef, undef) ;
- } elsif ($line =~ m/^IMG:\s*(.+)\s+----\s*(?:\s(.*))?\s*$/
- or $line =~ m/^(.+)\s+----\s*(?:\s(.*))?\s*$/) {
+ } elsif ($line =~ m/^(?:IMG:\s*)?(.+?)\s+----\s*(?:\s(.*?))?(?:\s+----\s+(.*?))?\s*$/) {
# image slide (default)
- $entry = create_file_entry ($TYPE_IMAGE, $1, undef, $2) ;
+#print "$line\n1=$1\n2=$2\n3=$3\n";
+ $entry = create_file_entry ($TYPE_IMAGE, $1, $3, $2) ;
} else {
$messages->abort_percentage ;
@@ -1793,7 +1795,8 @@
$SLIDE_COUNTER =~ s/%0n/$SLIDE_NUMBER/ ;
$SLIDE_COUNTER =~ s/%t/$SLIDE_TOTAL/ ;
# caption
- my $IMAGE_CAPTION = $entry->{caption} . $SLIDE_COUNTER . " $entry->{dimstring}" ;
+ my $IMAGE_CAPTION = $entry->{linktext} ? qq{
$entry->{caption}} : $entry->{caption};
+ $IMAGE_CAPTION .= $SLIDE_COUNTER . " $entry->{dimstring}" ;
# previous slide
my $PREV_SLIDE_LINK_TEXT = "" ;