NAME

File::Sticker::Reader - read and standardize meta-data from files

VERSION

version 0.9301

SYNOPSIS

use File::Sticker::Reader;

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

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

DESCRIPTION

This will read meta-data from files in various formats, and standardize it to a common nomenclature, such as "tags" for things called tags, or Keywords or Subject etc.

The standard nomenclature is:

url

The source URL of this file (ref 'dublincore.source')

creator

The author or artist who created this. (ref 'dublincore.creator')

title

The title of the item. (ref 'dublincore.title')

description

The description of the item. (ref 'dublincore.description')

tags

The item's tags. (ref 'Keywords').

Other fields will be called whatever the user has pre-configured.

DEBUGGING

whoami

Used for debugging info

METHODS

new

Create a new object, setting global values for the object.

my $obj = File::Sticker::Reader->new();

init

Initialize the object. Set which fields you are interested in ('wanted_fields').

$reader->init(wanted_fields=>{title=>'TEXT',count=>'NUMBER',tags=>'MULTI'});

name

The name of the reader; this is basically the last component of the module name. This works as either a class function or a method.

$name = $self->name();

$name = File::Sticker::Reader::name($class);

allow

If this reader can be used for the given file, and the wanted_fields then this returns true. Returns TRUE if there are no wanted_fields.

    if ($reader->allow($file))
    {
	....
    }

allowed_file

If this reader can be used for the given file, then this returns true. This must be overridden by the specific reader class.

    if ($reader->allowed_file($file))
    {
	....
    }

known_fields

Returns the fields which this reader knows about.

This must be overridden by the specific reader class.

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

read_meta

Read the meta-data from the given file.

This must be overridden by the specific reader class.

my $meta = $reader->read_meta($filename);

BUGS

Please report any bugs or feature requests to the author.