NEWBIE...loading this module on a mac

Started by Archive, May 12, 2010, 08:54:32 AM

Previous topic - Next topic

Archive

[Originally posted by flieckster on 2009-03-24 18:06:13-07]

ohhh... that makes sense. wow everything is working like it does in the commandline.... gezzz i guess i really need to learn more.

the last thing i'll bug you with is the tabbed output. when i use
Code:
\n
it still outputs like such.

00606562018_061.tif

Dynamic

Flieck

2000

2910

instead of this....

00606562018_061.tif   Dynamic   Flieck               2000   2910   

00606562018_061_pattern.tif   Dana DeRogatis   Ally               100   100

Code:
#!/usr/bin/perl -w

BEGIN { unshift @INC, '/usr/bin/lib' }

use Image::ExifTool 'ImageInfo';

my $file = "/Users/flieckb/Desktop/done/";

chdir( $file ) or die "Cant chdir to $file $!";
my(@file_list) = glob "*";
my $exifTool = new Image::ExifTool;
foreach my $file (@file_list){
my @tags = qw(filename source credit headline TransmissionReference instructions title ExifImageWidth ExifImageHeight);

$exifTool->Options(Duplicates => 0);

my $info = $exifTool->ImageInfo($file, \@tags);

foreach (@tags) {
open FILE, '>> /Volumes/172.25.5.227/Managers/Flieck/done.txt' or die $!;
print FILE "$info->{$_}\t";
close FILE;
}}

Archive

[Originally posted by exiftool on 2009-03-24 18:34:27-07]

try this:

Code:
#!/usr/bin/perl -w

BEGIN { unshift @INC, '/usr/bin/lib' }

use Image::ExifTool 'ImageInfo';

my $file = "/Users/flieckb/Desktop/done/";

chdir( $file ) or die "Cant chdir to $file $!";
my(@file_list) = glob "*";
my $exifTool = new Image::ExifTool;
open FILE, '>> /Volumes/172.25.5.227/Managers/Flieck/done.txt' or die $!;
foreach my $file (@file_list){
my @tags = qw(filename source credit headline TransmissionReference instructions title ExifImageWidth ExifImageHeight);

$exifTool->Options(Duplicates => 0);

my $info = $exifTool->ImageInfo($file, \@tags);

foreach (@tags) {
print FILE "$info->{$_}\t";
}
print FILE "\n";
}
close FILE;