NAME

File::Extractor - Extract meta-data from arbitrary files

SYNOPSIS

use File::Extractor;

my $extractor = File::Extractor->loadDefaultLibraries;
my %keywords  = $extractor->getKeywords($fh);

METHODS

getDefaultLibraries

my @default_libraries = File::Extractor->getDefaultLibraries;

Return a list of strings which are the names of the default extractor libraries.

loadDefaultLibraries

my $extractor = File::Extractor->loadDefaultLibraries;

Load the default set of libraries. Returns a File::Extractor instance.

loadConfigLibraries

my $extractor = File::Extractor->loadConfigLibraries($config);
my $new_extractor = $extractor->loadConfigLibraries($config);

Load multiple libraries as specified by the user. $config is a string given by the user that defines which libraries should be loaded. Has the format "[[-]LIBRARYNAME[(options)][:[-]LIBRARYNAME[(options)]]]*".. For example libextractor_mp3.so:libextractor_ogg.so loads the mp3 and the ogg library. The '-' before the LIBRARYNAME indicates that the library should be added to the end of the library list (addLibraryLast).

addLibrary

my $extractor = File::Extractor->addLibrary($library);
my $new_extractor = $extractor->addLibrary($library);

Add a library for keyword extraction. $library is the name of the library to be loaded.

addLibraryLast

my $extractor = File::Extractor->addLibraryLast($library);
my $new_extractor = $extractor->addLibraryLast($library);

Add a library for keyword extraction at the end of the list. $library is the name of the library to be loaded.

removeLibrary

$extractor->removeLibrary($library);

Remove a library for keyword extraction. $library is the name of the library to be removed.

getKeywords

my %keywords = $extractor->getKeywords($fh);
my %keywords = $extractor->getKeywords($data);

Extract keywords from an opened filehandle ($fh) or from a buffer in memory ($data). Returns a hash with all the extracted keywords. The hash keys represent the keywords type, the hash values are the actual keywords.

AUTHOR

Florian Ragwitz, <rafl at debian.org>

BUGS

Please report any bugs or feature requests to bug-file-extractor at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Extractor. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc File::Extractor

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007 Florian Ragwitz, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.