X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=mkgallery.pl;h=7857f4373490290a2fb0bd4a9423b40a55923cb1;hp=0a4988c067899577d46b7a934da5c67dbd4c7bd2;hb=2b0323392913d7822459e273f666de8d1992b5cb;hpb=0605e5404527fedc6da3fafbf8c7da1536aadd2c diff --git a/mkgallery.pl b/mkgallery.pl index 0a4988c..7857f43 100755 --- a/mkgallery.pl +++ b/mkgallery.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id$ +my $version='$Id$'; # Recursively create image gallery index and slideshow wrappings. # Makes use of modified "slideshow" javascript by Samuel Birch @@ -74,13 +74,14 @@ if ($rssfile && ! $haverssxml) { my $term = new Term::ReadLine "Edit Title"; FsObj->new(getcwd)->iterate; +if ($rssobj) { $rssobj->{'rss'}->save($rssobj->{'file'}); } sub help { print STDERR <<__END__; usage: $0 [options] --help: print help message and exit - --incpath: do not try to find .include diretory upstream, use + --incpath: do not try to find .gallery2 diretory upstream, use specified path (absolute or relavive). Use with causion. --debug: print a lot of debugging info to stdout as you run --asktitle: ask to edit album titles even if there are ".title" files @@ -134,10 +135,10 @@ sub getinc { my $depth=20; # arbitrary max depth if ($incpath) { - return $incpath."/.include"; + return $incpath."/.gallery2"; } - my $inc=".include"; + my $inc=".gallery2"; while ( ! -d $fullpath."/".$inc ) { $inc = "../".$inc; last unless ($depth-- > 0); @@ -488,14 +489,16 @@ sub makeaux { -head=>meta({-http_equiv=>'Refresh', -content=>"3; url=$fwdref"}), -style=>{-src=>$inc."gallery.css"}, - ),"\n"; + ),"\n", + comment("Created by ".$version),"\n"; } else { print $F start_html(-title=>$title, -encoding=>"utf-8", -bgcolor=>"#808080", -style=>{-src=>$inc."gallery.css"}, - ),"\n"; + ),"\n", + comment("Created by ".$version),"\n"; } print $F start_table({-class=>'navi'}),start_Tr,"\n", td(a({-href=>"../index.html"},"Index")),"\n", @@ -529,6 +532,7 @@ sub makeaux { {-src=>$inc."urlparser.js"}, {-src=>$inc."infopage.js"}, ]),"\n", + comment("Created by ".$version),"\n", start_center,"\n", h1($title),"\n", table({-class=>'ipage'}, @@ -576,7 +580,8 @@ sub startindex { {-src=>$inc."slideshow.js"}, {-src=>$inc."gallery.js"}, {-code=>"var incPrefix='$inc';"} - ]), + ]),"\n", + comment("Created by ".$version),"\n", a({-href=>"../index.html"},"UP"),"\n", start_center,"\n", h1($title),"\n", @@ -638,25 +643,7 @@ sub startimglist { print $IND h2("Images ", a({-href=>$slideref,-class=>'showStart',-id=>$first}, - '> slideshow')),"\n", - start_div({-id=>"slideshowWindow",-class=>"slideshowWindow"}), - div({-id=>"slideshowContainer", - -class=>"slideshowContainer"},""), - start_div({-id=>"slideshowControls", - -class=>"slideshowControls"}), - a({-href=>"#",-onClick=>"show.previous();return false;"}, - "Prev"), - a({-href=>"#",-onClick=>"show.play();return false;"}, - "Play"), - a({-href=>"#",-onClick=>"show.stop();return false;"}, - "Stop"), - a({-href=>"#",-onClick=>"show.next();return false;"}, - "Next"), - a({-href=>"#",-onClick=>"showStop();return false;"}, - "Exit"), - end_div, - end_div, - "\n"; + '> slideshow')),"\n"; } sub img_entry { @@ -685,14 +672,13 @@ sub img_entry { -class=>'showImage', -id=>$name}, img({-src=>$thumb})),"\n"),"\n", - start_div({-class=>'varimages',-id=>$name}),"\n"; + start_div({-class=>'varimages',-id=>$name,-name=>$title}),"\n"; foreach my $sz(@sizes) { my $src=$self->{$sz}->{'url'}; my $w=$self->{$sz}->{'dim'}->[0]; my $h=$self->{$sz}->{'dim'}->[1]; print $IND " ",a({-href=>$src, - -class=>"conceal ". - (($sz == 640)?"slideshowThumbnail":""), + -class=>"conceal", -title=>"Reduced to ".$w."x".$h}, $w."x".$h)," \n"; }