Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Question: module to grab file information??

by rafl (Friar)
on Apr 30, 2008 at 16:04 UTC ( #683711=note: print w/ replies, xml ) Need Help??


in reply to Question: module to grab file information??

CPAN has several modules that can guess a files type, like File::MimeInfo and File::MimeInfo::Magic. However most of those modules can't give you much more information that the filetype. Therefor I prefer using File::Extractor, which can collect detailed metadata for lots of filetypes like the resolution for image files, artist, title, etc from audio files and much more. The only downside is that it requires an external c library: libextractor.

Also note that I might be quite a bit biased as I'm the author of File::Extractor.


Comment on Re: Question: module to grab file information??
Re^2: Question: module to grab file information??
by lihao (Monk) on Apr 30, 2008 at 16:40 UTC
    Thanks, I need information more than MIME type, so File::Type and File::MimeInfo seem not OK. I installed your module through cpan shell, but it doesnot pass the compilation.
    cpan> install ExtUtils::PkgConfig ... Can't locate ExtUtils/PkgConfig.pm in @INC .... ... cpan> install ExtUtils::PkgConfig ...snip ok info... cpan> install File::Extractor Running install for module File::Extractor Running make for F/FL/FLORA/File-Extractor-0.03.tar.gz Is already unwrapped into directory /root/.cpan/build/File-Extractor +-0.03 Makefile.PL returned status 65280 Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install

    I installed libextractor(http://gnunet.org/libextractor/download/Extractor-0.5.tar.gz) by following the instruction(i.e. running "python setup.py install", everything looks ok), but I still get the same error information. ? ? any idea? many thanks...

    lihao

      CPANs error message is caused the cpan shell caching some state. Restarting the shell and invoking trying to install the module again should fix that.

      Also it looks like you installed the python bindings for libextractor but not libextractor itself. This is most likely what you want.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://683711]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-09-19 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls