X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=gal2%2Fgal-gen;h=d8edb57e6ba7e00401ebf1595136a2e9339a08d3;hb=b89f977dc5a5d785766118992aa90a7eff7b5d3b;hp=970e3d2b9950aeb11e9ffe2d9fb85b6c142664f1;hpb=bfa0d113c413c2431f72405623d79cbc7b0b40f2;p=gallery.git diff --git a/gal2/gal-gen b/gal2/gal-gen index 970e3d2..d8edb57 100755 --- a/gal2/gal-gen +++ b/gal2/gal-gen @@ -8,7 +8,6 @@ use warnings; use lib '/home/mj/web/gal2'; use UCW::Gallery; -use File::Spec; use Image::Magick; use IO::Handle; use File::Spec; @@ -23,9 +22,9 @@ my $orig_list = UCW::Gallery::ReadList('gallery.list') or die "Cannot read galle my $photo_dir = $UCW::Gallery::CF{'PhotoDir'}; if (-d $photo_dir) { - print "Using existing output directory $photo_dir\n"; + print "Using existing output directory: $photo_dir\n"; } else { - print "Creating output directory $photo_dir\n"; + print "Creating output directory: $photo_dir\n"; File::Path::mkpath($photo_dir) or die "Unable to create $photo_dir: $!\n"; } @@ -36,12 +35,13 @@ if (-f $photo_meta) { $old_meta = UCW::Gallery::ReadMeta($photo_meta); # use Data::Dumper; print "Read old meta: ", Dumper($old_meta), "\n"; } -my $meta = { 'photo' => {} }; +my $meta = { 'photo' => {}, 'sequence' => [] }; for my $f (@$orig_list) { my $id = $f->{id}; my $rotate = $f->{orientation}; my $xfrm = $f->{xfrm}; + push @{$meta->{sequence}}, $id; print "$id: "; my $p = new Image::Magick;