X-Git-Url: https://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=imagedir;h=9d66c098f1b6ed014456f1ea2e0bef287cb09271;hb=84c8fd40e7ca912e16f18a29b8475c1579c04b4b;hp=b11888229b171e704c410474879065e0b4170d37;hpb=3cc69c7ec1bb26e4dd44f17afae1611e463adc13;p=oss%2Fimgwww.git diff --git a/imagedir b/imagedir index b118882..9d66c09 100755 --- a/imagedir +++ b/imagedir @@ -64,8 +64,10 @@ open OUT,">index.html"; print OUT "$dir\n\n

$dir

\n" ."

back

". "\n"; -my @piclist=(<*.jpg>,<*.gif>,<*.png>) ; -print STDERR "@piclist\n"; +my @piclist=grep (/\.(jpe?g|png|tiff?|gif)$/i, <*>) ; +my @movielist= grep(/\.(mp4|avi|flv|mpg)$/i,<*>); +print STDERR "Pictures found @piclist\n"; +print STDERR "Videos found @movielist\n"; my ($prev,$next); for ($j=0;$j<=$#piclist;$j++) { $_ = $piclist[$j]; @@ -76,6 +78,7 @@ for ($j=0;$j<=$#piclist;$j++) { $next = undef; } print STDERR "$j:$_"; + chmod 0644, $_; my $info = image_info($_); my $thumbname=rescale($_,THUMBDIR,THUMBSIZE,$info); my $inlinename=rescale($_,INLINEDIR,INLINESIZE,$info);