File::Sticker::Reader - read and standardize meta-data from files
version 3.0101
use File::Sticker::Reader; my $obj = File::Sticker::Reader->new(%args); my $meta = $obj->read_meta($filename);
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:
The source URL of this file (ref 'dublincore.source')
The author or artist who created this. (ref 'dublincore.creator')
The title of the item. (ref 'dublincore.title')
The description of the item. (ref 'dublincore.description')
The item's tags. (ref 'Keywords').
Other fields will be called whatever the user has pre-configured.
Used for debugging info
Create a new object, setting global values for the object.
my $obj = File::Sticker::Reader->new();
Initialize the object. Set which fields you are interested in ('wanted_fields').
$reader->init(wanted_fields=>{title=>'TEXT',count=>'NUMBER',tags=>'MULTI'});
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);
The priority of this reader. Readers with higher priority get tried first. This is useful where there may be more than one possible meta-data format for a file, such as EXIF versus XATTR.
This works as either a class function or a method.
This must be overridden by the specific writer class.
$priority = $self->priority();
$priority = File::Sticker::Reader::priority($class);
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)) { .... }
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)) { .... }
Returns the fields which this reader knows about.
This must be overridden by the specific reader class.
my $known_fields = $reader->known_fields();
Read the meta-data from the given file.
my $meta = $reader->read_meta($filename);
Please report any bugs or feature requests to the author.
To install File::Sticker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Sticker
CPAN shell
perl -MCPAN -e shell install File::Sticker
For more information on module installation, please visit the detailed CPAN module installation guide.