From fe923497feba3d9f276ca490967b91382e2dbfd8 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 6 Jun 2016 11:02:34 +0200 Subject: Add --basepath option Signed-off-by: Florian Pritz --- generate_gallery.pl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/generate_gallery.pl b/generate_gallery.pl index 978857d..8373fd2 100755 --- a/generate_gallery.pl +++ b/generate_gallery.pl @@ -17,8 +17,9 @@ my %opts = (); $opts{template} = "$templatedir/template.html"; $opts{thumbnailsize} = 200; +$opts{basepath} = ""; -GetOptions(\%opts, "exif|e", "verbose|v", "help|h", "filenamedesc", "template=s", "thumbnailsize|s=i", "htmlonly") or pod2usage(2); +GetOptions(\%opts, "exif|e", "verbose|v", "help|h", "filenamedesc", "template=s", "thumbnailsize|s=i", "htmlonly", "basepath=s") or pod2usage(2); pod2usage(0) if $opts{help}; pod2usage(-verbose => 0) if (@ARGV== 0); @@ -77,8 +78,8 @@ for my $dir (@ARGV) { $html .= "\n"; } open TEMPLATE, "<", "$opts{template}"; @@ -115,6 +116,7 @@ generate_gallery.pl [options] --htmlonly don't copy the fancybox directory --thumbnailsize, -s change size of the thumbnails in pixels (default: 200) + --basepath Prepend this path to the URLs in the output HTML =head1 DESCRIPTION @@ -156,6 +158,10 @@ Only generate thumbnails and the html file. This disables copying of fancybox. Change the size of the generated thumbnails in pixels. Default: 200 +=item B<--basepath> + +Prepend this path to the URLs in the output HTML. The path should probably end with a /. + =back =cut -- cgit v1.2.3-24-g4f1b