The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

File::Sticker::Writer::Exif - write and standardize meta-data from EXIF file

VERSION

version 3.0101

SYNOPSIS

    use File::Sticker::Writer::Exif;

    my $obj = File::Sticker::Writer::Exif->new(%args);

    my %meta = $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

priority

The priority of this writer. Writers with higher priority get tried first.

allowed_file

If this writer 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 writer knows about.

    my $known_fields = $writer->known_fields();

readonly_fields

Returns the fields which this writer knows about, which can't be overwritten, but are allowed to be "wanted" fields. Things like file-size etc.

    my $readonly_fields = $writer->readonly_fields();

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 = $writer->_get_the_real_file(filename=>$filename);

_read_freeform_data

Read the freeform data as YAML data from the XMP:Description field.

    my $ydata = $self->_read_freeform_data(exif=>$exif);

_write_freeform_data

Write the freeform data as YAML data into the Description 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 Description field rather than the UserComment or ImageDescription field.

    $self->_convert_freeform_data(exif=>$exif);

BUGS

Please report any bugs or feature requests to the author.