script like "mkindex.pl".
command-line options:
+ --incpath: do not try to fine .include 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
--noasktitle: don't ask to enter album titles even where ".title"
use Image::Info qw/image_info dim/;
use Term::ReadLine;
use Getopt::Long;
+use Encode;
+use encoding 'utf-8';
+binmode(STDOUT, ":utf8");
my $haveimagick = eval { require Image::Magick; };
{ package Image::Magick; } # to make perl compiler happy
######################################################################
+my $incpath;
my $debug = 0;
my $asktitle = 0;
my $noasktitle = 0;
-GetOptions('asktitle'=>\$asktitle,
+charset("utf-8");
+
+GetOptions( 'incpath'=>\$incpath,
+ 'asktitle'=>\$asktitle,
'noasktitle'=>\$noasktitle,
'debug'=>\$debug);
my $fullpath=shift; # this is not a method
my $depth=20; # arbitrary max depth
+ if ($incpath) {
+ return $incpath."/.include";
+ }
+
my $inc=".include";
while ( ! -d $fullpath."/".$inc ) {
$inc = "../".$inc;
my $title = $self->{-info}->{'Comment'};
$title = $name unless ($title);
- print "slide: \"$pref\"->\"$name\"->\"$nref\"\n" if ($debug);
+ print "slide: \"$title\": \"$pref\"->\"$name\"->\"$nref\"\n" if ($debug);
# slideshow
for my $refresh('static', 'slide') {
warn "cannot open \"$fn\": $!";
next;
}
+ binmode($F, ":utf8");
if ($refresh eq 'slide') {
print $F start_html(
+ -encoding=>"utf-8",
-title=>$title,
-bgcolor=>"#808080",
-head=>meta({-http_equiv=>'Refresh',
} else {
print $F start_html(-title=>$title,
+ -encoding=>"utf-8",
-bgcolor=>"#808080",
-style=>{-src=>$inc."gallery.css"},
),"\n";
}
my $imgsrc = sprintf("../.%s/%s",$sizes[0],$name);
print $F start_html(-title=>$title,
+ -encoding=>"utf-8",
-style=>{-src=>$inc."gallery.css"},),"\n",
start_center,"\n",
h1($title),"\n",
warn "cannot open $fn: $!";
return;
}
+ binmode($IND, ":utf8");
$self->{-IND} = $IND;
my $inc = $self->{-inc};
my $title = $self->{-title};
print $IND start_html(-title => $title,
+ -encoding=>"utf-8",
-style=>{-src=>[$inc."gallery.css",
$inc."lightbox.css"]},
-script=>[{-code=>"var incPrefix='$inc';"},