NAME

File::Sticker::Scribe::Gif - read, write and standardize meta-data from GIF file

VERSION

version 4.00

SYNOPSIS

use File::Sticker::Scribe::Gif;

my $obj = File::Sticker::Scribe::Gif->new(%args);

my %meta = $obj->read_meta($filename);

$obj->write_meta(%args);

DESCRIPTION

This will read and write meta-data from GIF 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 scribe. 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 a GIF image.

known_fields

Returns the fields which this scribe knows about. This scribe has no limitations, because all the fields are freeform fields.

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);

delete_field_from_file

Completely remove the given field. This does no checking.

$scribe->delete_field_from_file(filename=>$filename,field=>$field);

replace_all_meta

Overwrite the existing meta-data with that given. THIS DOES NOT CHECK that readonly fields are not being overwritten.

(This supercedes the parent method because we can do it more efficiently this way)

$scribe->replace_all_meta(filename=>$filename,meta=>\%meta);

replace_one_field

Overwrite the given field. This does no checking.

$scribe->replace_one_field(filename=>$filename,field=>$field,value=>$value);

Helper Functions

Private interface.

_load_meta

Quick non-checking loading of the meta-data. Does not standardize any fields.

my $meta = $self->_load_meta($filename);

_write_meta

Write the meta-data as YAML data in the Comment field. This overwrites whatever is there, it does not check. This saves multi-value comma-separated fields as arrays.

$self->_write_meta(meta=>\%meta,filename=>$filename);

_get_the_real_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);

BUGS

Please report any bugs or feature requests to the author.