pkgsrc/www/make_album/patches/patch-aa

115 lines
3.3 KiB
Text

$NetBSD: patch-aa,v 1.2 2002/03/12 23:34:46 lukem Exp $
--- make_album.orig Fri Sep 15 07:43:30 2000
+++ make_album
@@ -1221,10 +1221,14 @@
#
sub read_cameras {
my ($model, $camfile);
+ my (@camfiles) = (
+ $ENV{"CAMERAS_TXT"},
+ $ENV{"HOME"} . "/lib/cameras.txt",
+ $0 . "/../../lib/cameras.txt",
+ );
- if (!defined ($camfile = $ENV{"CAMERAS_TXT"})) {
- $camfile = $ENV{"HOME"}."/lib/cameras.txt";
- }
+ foreach $camfile (@camfiles) {
+ next if ($camfile eq "");
if (open(CAMERAS, "<$camfile")) {
$model = "";
@camera_models = ();
@@ -1253,7 +1257,9 @@
}
}
close(CAMERAS);
+ return;
}
+ }
}
# Get EXIF/other info about the image "$tag"
@@ -1440,7 +1446,7 @@
print FILE "<img src=\"$tag.jpg\" height=\"$y\" width=\"$x\" />";
print FILE "</TD>";
print FILE "</TR><TR><TD>";
- print FILE "This img:\n";
+ print FILE "This image:\n";
foreach $t (@tours) {
if ($tour{$t}{"dir"} eq ".") {
$d2 = "";
@@ -1454,20 +1460,8 @@
print FILE "</strong>" if ($t eq $tour);
print FILE "</a>";
}
- print FILE "<hr />Indices:";
- foreach $t (@tours) {
- if ($tour{$t}{"dir"} eq ".") {
- $d2 = "";
- } else {
- $d2 = $tour{$t}{"dir"}."/";
- }
- print FILE "<br /><a href=\"";
- print FILE $home.$d2."index.htm#$tag\">";
- print FILE "<strong>" if ($t eq $tour);
- print FILE $t;
- print FILE "</strong>" if ($t eq $tour);
- print FILE "</a>";
- }
+ print FILE "<hr /><a href=\"index.htm#$tag\">Index</a>";
+ print FILE "<hr /><a href=\"".($dir ne "." ? "../" : "")."../index.htm\">Parent directory</a>";
print FILE "</TD></TR>\n";
print FILE "<TR><TD>";
if ($next) {
@@ -1478,7 +1472,7 @@
print FILE "</TD></TR>\n";
print FILE "<TR><TD COLSPAN=2>";
if ($notes{$tag} ne "") {
- print FILE $notes{$tag};
+ print FILE "<CENTER>$notes{$tag}</CENTER>";
}
print FILE "<br /><font size=\"-1\">".$x."x".$y." (best";
if ($x != $image{"master/$tag.tiff"}{"x"} || $y != $image{"master/$tag.tiff"}{"y"}) {
@@ -1563,6 +1557,7 @@
print FILE ", " if ($comma); $comma = 1;
print FILE "Focus: $m $f";
if ($f != 0
+ && $f ne "infinite"
&& defined ($focal = $rexif->{"focal"})
&& $focal ne ""
&& ($aperture = $rexif->{"fstop"}) ne ""
@@ -1858,9 +1853,9 @@
%image = {};
foreach $tag (@tags) {
- if (open(IDENTIFY, "identify -cache $im_cache -ping web/thumbs/$tag.jpg|")) {
+ if (open(IDENTIFY, "identify -cache $im_cache web/thumbs/$tag.jpg|")) {
while (<IDENTIFY>) {
- if (/^\S+\s+(\d+)x(\d+)/) {
+ if (/JPEG\s+(\d+)x(\d+)/) {
$image{"thumbs/$tag.jpg"}{"x"} = $1;
$image{"thumbs/$tag.jpg"}{"y"} = $2;
}
@@ -1890,9 +1885,10 @@
if ((! -f $file) && -f $file.".gz") {
$file = $file.".gz";
}
- if (open(IDENTIFY, "identify -ping $file|")) {
+ print "\t$file\n";
+ if (open(IDENTIFY, "identify $file|")) {
while (<IDENTIFY>) {
- if (/^\S+\s+(\d+)x(\d+)/) {
+ if (/TIFF\s+(\d+)x(\d+)/) {
$image{"master/$tag.tiff"}{"x"} = $1;
$image{"master/$tag.tiff"}{"y"} = $2;
$got_size = 1;
@@ -1961,7 +1957,7 @@
print INDEX "</td></tr>";
}
print INDEX "</table>";
- print INDEX "<a href=\"".($dir ne "." ? "../" : "")."../index.htm\">Parent</a>";
+ print INDEX "<br><a href=\"".($dir ne "." ? "../" : "")."../index.htm\">Parent directory</a>";
foreach $section (sort {$a <=> $b} keys %section) {
print INDEX "<hr /><h2>".$section{$section}{"name"}."</h2>\n";