NAME
File::Sticker::Scribe::Exif - read, write and standardize meta-data from EXIF file
VERSION
version 4.0101
SYNOPSIS
my
$obj
= File::Sticker::Scribe::Exif->new(
%args
);
my
%meta
=
$obj
->read_meta(
$filename
);
$obj
->write_meta(
%args
);
DESCRIPTION
This will write meta-data from EXIF files, and standardize it to a common nomenclature, such as "tags" for things called tags, or Keywords or Subject etc.
DEBUGGING
whoami
Used for debugging info
METHODS
init
Initialize the object.
$scribe
->init(
wanted_fields
=>{
title
=>
'TEXT'
,
count
=>
'NUMBER'
,
tags
=>
'MULTI'
});
priority
The priority of this writer. Scribes with higher priority get tried first.
allowed_file
If this scribe can be used for the given file, then this returns true. File must be one of: PDF or an image which is not a GIF. (GIF files need to be treated separately) (ExifTool can't write to EPUB)
known_fields
Returns the fields which this scribe knows about.
my
$known_fields
=
$scribe
->known_fields();
readonly_fields
Returns the fields which this scribe knows about, which can't be overwritten, but are allowed to be "wanted" fields. Things like file-size etc.
my
$readonly_fields
=
$scribe
->readonly_fields();
read_meta
Read the meta-data from the given file.
my
$meta
=
$obj
->read_meta(
$filename
);
Helper Functions
Private interface.
replace_one_field
Overwrite the given field. This does no checking.
$writer
->replace_one_field(
filename
=>
$filename
,
field
=>
$field
,
value
=>
$value
);
delete_field_from_file
Completely remove the given field. This does no checking.
$writer
->delete_field_from_file(
filename
=>
$filename
,
field
=>
$field
);
_get_the_real_file
If the file is a directory, look for a cover file. If the file is a soft link, look for the file it is pointing to (because ExifTool behaves badly with soft links).
my
$real_file
=
$scribe
->_get_the_real_file(
filename
=>
$filename
);
_read_freeform_data
Read the freeform data as YAML data from the XMP-sticker:FreeFields field.
my
$ydata
=
$self
->_read_freeform_data(
exif
=>
$exif
);
_write_freeform_data
Write the freeform data as YAML data into the XML-sticker:FreeFields field This overwrites whatever is there, it does not check.
$self
->_write_freeform_data(
newdata
=>\
%newdata
,
exif
=>
$exif
);
_convert_freeform_data
Convert the freeform data so that it is placed into the XMP-sticker:FreeFields field rather than the XMP:Description, UserComment or ImageDescription field.
$self
->_convert_freeform_data(
exif
=>
$exif
);
BUGS
Please report any bugs or feature requests to the author.