Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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??

Replies are listed 'Best First'.
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/ 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( by following the instruction(i.e. running "python install", everything looks ok), but I still get the same error information. ? ? any idea? many thanks...


      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://683711]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-06-21 20:56 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (119 votes). Check out past polls.