X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=gal2%2Fgal-scan;h=aa286aff234d6b5a5729213014e5f92f3a441708;hb=1f16a38e970000b2c73a59a84182b5f90ee5cb61;hp=951a93c646376f9d6908e4da3ec2704986f171c3;hpb=168379589bee5b5d1c46f749748c3d3b1fd80c9a;p=gallery.git diff --git a/gal2/gal-scan b/gal2/gal-scan index 951a93c..aa286af 100755 --- a/gal2/gal-scan +++ b/gal2/gal-scan @@ -6,7 +6,7 @@ use strict; use warnings; use lib '/home/mj/web/gal2'; -use UCW::Gallery; +use UCW::Gallery qw(%CF); use File::Spec; use Image::EXIF; @@ -29,7 +29,7 @@ if (@ARGV) { my @p = (); while (my $e = readdir D) { my $f = File::Spec->canonpath(File::Spec->catfile($in, $e)); - if ($f =~ m{\.jpe?g$}i) { + if ($f =~ m{\.(jpe?g|png)$}i) { push @p, $f; } } @@ -47,7 +47,7 @@ if (@ARGV) { } UCW::Gallery::LoadConfig; -my $orig_prefix = $UCW::Gallery::CF{'OrigDir'}; +my $orig_prefix = $CF{'OrigDir'}; $orig_prefix =~ m{/$} or $orig_prefix .= '/'; print "Scanning photos\n"; @@ -82,7 +82,7 @@ foreach my $f (@files) { file => $rel_name, id => $id, orientation => $o, - xfrm => $UCW::Gallery::CF{'ScanDefaultTransform'}, + xfrm => $CF{'ScanDefaultTransform'}, title => '', }; print "ori=$o\n";