1Image::ExifTool::ImportU(s3e)r Contributed Perl DocumentaItmiaogne::ExifTool::Import(3)
2
3
4
6 Image::ExifTool::Import - Import CSV and JSON database files
7
9 use Image::ExifTool::Import qw(ReadCSV ReadJSON);
10
11 $err = ReadCSV($csvFile, \%database);
12
13 $err = ReadJSON($jsonfile, \%database);
14
16 This module contains routines for importing tag information from CSV
17 (Comma Separated Value) and JSON (JavaScript Object Notation) database
18 files.
19
21 Exports nothing by default, but ReadCSV and ReadJSON may be exported.
22
24 ReadCSV / ReadJSON
25 Read CSV or JSON file into a database hash.
26
27 Inputs:
28 0) CSV file name.
29
30 1) Hash reference for database object.
31
32 2) Optional flag to set '-' values to undef in the database. (Used
33 for deleting tags.)
34
35 3) [ReadJSON only] Optional character set for converting Unicode
36 escape sequences in strings. Defaults to "UTF8". See the ExifTool
37 Charset option for a list of valid settings.
38
39 Return Value:
40 These functions return an error string, or undef on success and
41 populate the database hash with entries from the CSV or JSON file.
42 Entries are keyed based on the SourceFile column of the CSV or JSON
43 information, and are stored as hash lookups of tag name/value for
44 each SourceFile.
45
47 Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
48
49 This library is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself.
51
53 Image::ExifTool(3pm)
54
55
56
57perl v5.12.4 2011-09-01 Image::ExifTool::Import(3)