.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Image::ExifTool::Import 3" .TH Image::ExifTool::Import 3 2024-04-05 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Image::ExifTool::Import \- Import CSV and JSON database files .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Image::ExifTool::Import qw(ReadCSV ReadJSON); \& \& $err = ReadCSV($csvFile, \e%database); \& \& $err = ReadJSON($jsonfile, \e%database); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module contains routines for importing tag information from CSV (Comma Separated Value) and JSON (JavaScript Object Notation) database files. .SH EXPORTS .IX Header "EXPORTS" Exports nothing by default, but ReadCSV and ReadJSON may be exported. .SH METHODS .IX Header "METHODS" .SS "ReadCSV / ReadJSON" .IX Subsection "ReadCSV / ReadJSON" Read CSV or JSON file into a database hash. .IP Inputs: 4 .IX Item "Inputs:" 0) CSV file name or file reference. .Sp 1) Hash reference for database object. .Sp 2) Optional string used to represent an undefined (missing) tag value. (Used for deleting tags.) .Sp 3) For ReadCSV this gives the delimiter for CSV entries, with a default of ",". For ReadJSON this is the character set for converting Unicode escape sequences in strings, with a default of "UTF8". See the ExifTool Charset option for a list of valid character sets. .IP "Return Value:" 4 .IX Item "Return Value:" These functions return an error string, or undef on success and populate the database hash with entries from the CSV or JSON file. Entries are keyed based on the SourceFile column of the CSV or JSON information, and are stored as hash lookups of tag name/value for each SourceFile. .SH AUTHOR .IX Header "AUTHOR" Copyright 2003\-2024, Phil Harvey (philharvey66 at gmail.com) .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBImage::ExifTool\fR\|(3pm)