[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] metadata extractor

Ilmari Heikkinen

9/10/2007 11:18:00 PM

url: http://dark.fhtr.org/repo...
tarball: http://dark.fhtr.org/repo.../metadata-0.1.tar.gz

Description
-----------

This package `Metadata' comes with a library called `metadata' and
a small program called `mdh'.

The library probes files for their metadata (e.g. jpeg dimensions
and camera make, mp3 artist, pdf word count) and returns the metadata
as a Hash.

Mdh can print out file metadata as YAML and package the metadata
with the file.

This package has many dependencies since there is no single universal
metadata header format that all files use. Blame resource forks, filename
extensions, bags of bytes and mimetypes.

The metadata hash mostly follows the shared-metadata-spec naming.
http://wiki.freedesktop.org/wiki/Specifications/shared-filemet...

Usage
-----

# print out metadata header
mdh -p myfile.jpg

# create myfile.jpg.mdh, which consists of metadata header + myfile.jpg
mdh myfile.jpg

# print out metadata header from mdh file
mdh -e -p myfile.jpg.mdh

# strip out metadata header from mdh file and save it to myfile.jpg
mdh -e myfile.jpg.mdh

irb> Metadata.extract('myfile.jpg')
irb> Metadata.extract_text('myfile.pdf')
irb> Pathname.new("myfile.jpg").metadata


Requirements
------------

* Ruby 1.8

* Tons of metadata extraction programs,
list of debian packages follows:
dcraw
libimlib2-ruby
extract
libimage-exiftool-perl
poppler-utils
mplayer
html2text
imagemagick
unhtml
pstotext
antiword
catdoc
shared-mime-info

* You do want to install the latest versions of dcraw and
shared-mime-info to be able to handle camera raw images.
http://cybercom.net/~dcof...
http://freedesktop.org/wiki/Software/shared...

* Python + chardet library
http://chardet.feedp...

License
-------

Ruby's


Ilmari Heikkinen <ilmari.heikkinen gmail com>

1 Answer

Konrad Meyer

9/13/2007 8:16:00 AM

0

Quoth Ilmari Heikkinen on Monday 10 September 2007 04:18:25 pm:
> url: http://dark.fhtr.org/repo...
> tarball: http://dark.fhtr.org/repo.../metadata-0.1.tar.gz
>
> Description
> -----------
>
> This package `Metadata' comes with a library called `metadata' and
> a small program called `mdh'.
>
> The library probes files for their metadata (e.g. jpeg dimensions
> and camera make, mp3 artist, pdf word count) and returns the metadata
> as a Hash.
>
> Mdh can print out file metadata as YAML and package the metadata
> with the file.
>
> This package has many dependencies since there is no single universal
> metadata header format that all files use. Blame resource forks, filename
> extensions, bags of bytes and mimetypes.
>
> The metadata hash mostly follows the shared-metadata-spec naming.
> http://wiki.freedesktop.org/wiki/Specifications/shared-filemet...
>
> Usage
> -----
>
> # print out metadata header
> mdh -p myfile.jpg
>
> # create myfile.jpg.mdh, which consists of metadata header + myfile.jpg
> mdh myfile.jpg
>
> # print out metadata header from mdh file
> mdh -e -p myfile.jpg.mdh
>
> # strip out metadata header from mdh file and save it to myfile.jpg
> mdh -e myfile.jpg.mdh
>
> irb> Metadata.extract('myfile.jpg')
> irb> Metadata.extract_text('myfile.pdf')
> irb> Pathname.new("myfile.jpg").metadata
>
>
> Requirements
> ------------
>
> * Ruby 1.8
>
> * Tons of metadata extraction programs,
> list of debian packages follows:
> dcraw
> libimlib2-ruby
> extract
> libimage-exiftool-perl
> poppler-utils
> mplayer
> html2text
> imagemagick
> unhtml
> pstotext
> antiword
> catdoc
> shared-mime-info
>
> * You do want to install the latest versions of dcraw and
> shared-mime-info to be able to handle camera raw images.
> http://cybercom.net/~dcof...
> http://freedesktop.org/wiki/Software/shared...
>
> * Python + chardet library
> http://chardet.feedp...
>
> License
> -------
>
> Ruby's
>
>
> Ilmari Heikkinen <ilmari.heikkinen gmail com>

Any chance this could be expanded to add FLAC and OGG support?

Thanks!
--
Konrad Meyer <konrad@tylerc.org> http://konrad.sobertil...