diff options
Diffstat (limited to 'exiftool')
-rwxr-xr-x | exiftool | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -10,7 +10,7 @@ use strict; require 5.004; -my $version = '12.11'; +my $version = '12.12'; # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool' my $exeDir; @@ -859,7 +859,11 @@ for (;;) { } if (/^csvdelim$/i) { $csvDelim = shift; - defined $csvDelim or Error("Expecting argument for -csvDelim option\n"), $badCmd=1; + defined $csvDelim or Error("Expecting argument for -csvDelim option\n"), $badCmd=1, next; + $csvDelim =~ /"/ and Error("CSV delimiter can not contain a double quote\n"), $badCmd=1, next; + my %unescape = ( 't'=>"\t", 'n'=>"\n", 'r'=>"\r", '\\' => '\\' ); + $csvDelim =~ s/\\(.)/$unescape{$1}||"\\$1"/sge; + $mt->Options(CSVDelim => $csvDelim); next; } if (/^d$/ or $a eq 'dateformat') { @@ -5095,8 +5099,10 @@ generate a fixed-column CSV file instead of using the B<-csv> option. =item B<-csvDelim> I<STR> -Set the delimiter for separating CSV entries for the B<-csv> option. -Default is ','. +Set the delimiter for separating CSV entries for CSV file input/output via +the B<-csv> option. I<STR> may contain "\t", "\n", "\r" and "\\" to +represent TAB, LF, CR and '\' respectively. A double quote is not allowed +in the delimiter. Default is ','. =item B<-d> I<FMT> (B<-dateFormat>) @@ -5349,7 +5355,7 @@ with this command: produces output like this: - -- Generated by ExifTool 12.11 -- + -- Generated by ExifTool 12.12 -- File: a.jpg - 2003:10:31 15:44:19 (f/5.6, 1/60s, ISO 100) File: b.jpg - 2006:05:23 11:57:38 |