# \[ANN\] Metadata 1.0-rc2

**URL:** https://rubytalk.org/t/ann-metadata-1-0-rc2/40734
**Category:** ruby-talk
**Created:** [19 September 2007 09:08 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734 "2007-09-19T09:08:47Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)
#### Post date: [19 September 2007 09:08 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/1 "2007-09-19T09:08:47Z")

</div>

Getting close to the 1.0 release of the metadata library.  
If there are no major problems with this release candidate, that is.

tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)  
git: [http://dark.fhtr.org/repos/metadata](http://dark.fhtr.org/repos/metadata)

Changes

> **···**
>
> -------  
> &nbsp;&nbsp;\* bittorrent .torrent support  
> &nbsp;&nbsp;\* untested ape/musepack/wavepack support with apetag gem  
> &nbsp;&nbsp;&nbsp;&nbsp;(couldn't find any ape samples)  
> &nbsp;&nbsp;\* 'name' and 'author' parsed from mplayer output  
> &nbsp;&nbsp;\* more documentation  
> &nbsp;&nbsp;\* better handling of images that have no exif info  
> &nbsp;&nbsp;\* tested ra, wma and m4a  
> &nbsp;&nbsp;\* tested more image formats  
> &nbsp;&nbsp;\* fixed audio samplerate and channels for videos  
> &nbsp;&nbsp;&nbsp;&nbsp;(i.e. convert the string to int.)  
> &nbsp;&nbsp;\* bin/mdh now prints the metadata as the default action.  
> &nbsp;&nbsp;&nbsp;&nbsp;Use -c to create an MDH file.  
> &nbsp;&nbsp;\* MDH files have a "MDH#{version\_byte}" header now,  
> &nbsp;&nbsp;&nbsp;&nbsp;the validity of which is checked by mdh.
> 
> Thanks  
> ------
> 
> &nbsp;&nbsp;Konrad Meyer for his patient testing and bug reports.  
> &nbsp;&nbsp;Darren Kirby for the heads-up on wmainfo's ASF-parsing capabilities  
> &nbsp;&nbsp;(along with being the author of wmainfo-rb and flacinfo-rb.)
> 
> Description  
> -----------
> 
> &nbsp;&nbsp;This package `Metadata' comes with a library called `metadata' and  
> &nbsp;&nbsp;a small program called `mdh'.
> 
> &nbsp;&nbsp;The library probes files for their metadata (e.g. jpeg dimensions  
> &nbsp;&nbsp;and camera make, mp3 artist, pdf text and word count) and returns the  
> &nbsp;&nbsp;metadata as a Hash. All strings in the metadata are converted to UTF-8.
> 
> &nbsp;&nbsp;The `mdh'-program can print out file metadata as YAML and package the  
> &nbsp;&nbsp;metadata with the file.
> 
> &nbsp;&nbsp;The metadata hash follows the shared file metadata spec naming, with some  
> &nbsp;&nbsp;additional fields, see list at the end of this file (Appendix A.)
> 
> &nbsp;&nbsp;For details on the MDH file format, see the end of this file (Appendix B.)
> 
> Usage  
> -----
> 
> &nbsp;&nbsp;# print out metadata for myfile.jpg  
> &nbsp;&nbsp;mdh myfile.jpg
> 
> &nbsp;&nbsp;# create myfile.jpg.mdh, which consists of an MDH metadata header + myfile.jpg  
> &nbsp;&nbsp;mdh -c myfile.jpg
> 
> &nbsp;&nbsp;# print out the metadata header from an MDH file  
> &nbsp;&nbsp;mdh -e -p myfile.jpg.mdh
> 
> &nbsp;&nbsp;# strip out the metadata header from an MDH file and save it to myfile.jpg  
> &nbsp;&nbsp;mdh -e myfile.jpg.mdh
> 
> &nbsp;&nbsp;# print out the list of options  
> &nbsp;&nbsp;mdh -h
> 
> &nbsp;&nbsp;\> require 'metadata'  
> &nbsp;&nbsp;\> Metadata.extract('myfile.jpg')  
> &nbsp;&nbsp;\> Metadata.extract\_text('myfile.pdf')  
> &nbsp;&nbsp;\> Pathname.new("myfile.jpg").metadata
> 
> List of supported formats  
> -------------------------
> 
> &nbsp;&nbsp;Audio:  
> &nbsp;&nbsp;&nbsp;&nbsp;Whatever you manage to make mplayer play.  
> &nbsp;&nbsp;&nbsp;&nbsp;Plus special handlers for FLAC, m4a, ape, musepack, wavepack and wma.  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mp3, flac, ogg, wav, ra, wma, m4a  
> &nbsp;&nbsp;&nbsp;&nbsp;Should also work:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wv, mpc, ape
> 
> &nbsp;&nbsp;Video:  
> &nbsp;&nbsp;&nbsp;&nbsp;Whatever you manage to make mplayer play.  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wmv, mov, divx, xvid, flv, ogm, mpg, mkv
> 
> &nbsp;&nbsp;Images:  
> &nbsp;&nbsp;&nbsp;&nbsp;Should handle pretty much anything (apart from ORF.)  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jpeg, png, gif, nef, dng, crw, pef, psd, tga, tif, xcf, xpm, ppm, bmp
> 
> &nbsp;&nbsp;Documents:  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pdf, ppt, odp, sxi, ps, ps.gz, html, txt  
> &nbsp;&nbsp;&nbsp;&nbsp;Should work:  
> &nbsp;&nbsp;&nbsp;&nbsp;- OpenOffice docs work to some degree (personally, I'm using unoconv to  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;convert OO docs to temp PDFs for the text & dimensions extraction, so  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;those bits of data are missing.)  
> &nbsp;&nbsp;&nbsp;&nbsp;- MS Office docs to some degree (ppt at least, doc and xls should work too,  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions missing due to the above temp PDF -thing.)
> 
> &nbsp;&nbsp;Others:  
> &nbsp;&nbsp;&nbsp;&nbsp;- BitTorrent .torrent files  
> &nbsp;&nbsp;&nbsp;&nbsp;- Archive contents  
> &nbsp;&nbsp;&nbsp;&nbsp;- Whatever `extract' outputs and I am handling
> 
> Requirements  
> ------------
> 
> &nbsp;&nbsp;\* Ruby 1.8
> 
> &nbsp;&nbsp;\* Tons of metadata extraction programs and libs.  
> &nbsp;&nbsp;&nbsp;&nbsp;This package has many dependencies since there is no single universal  
> &nbsp;&nbsp;&nbsp;&nbsp;metadata header format that all files use. Blame resource forks, filename  
> &nbsp;&nbsp;&nbsp;&nbsp;extensions, bags of bytes and mimetypes.
> 
> &nbsp;&nbsp;&nbsp;&nbsp;List of gems:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flacinfo-rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wmainfo-rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP4info  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id3lib-ruby  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;apetag
> 
> &nbsp;&nbsp;&nbsp;&nbsp;List of Debian packages:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dcraw  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libimlib2-ruby  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extract  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libimage-exiftool-perl  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poppler-utils  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mplayer  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html2text  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imagemagick  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unhtml  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pstotext  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antiword  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catdoc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shared-mime-info
> 
> &nbsp;&nbsp;\* You do want to install the latest versions of dcraw and  
> &nbsp;&nbsp;&nbsp;&nbsp;shared-mime-info to be able to handle camera raw images.  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://cybercom.net/~dcoffin/dcraw/](http://cybercom.net/~dcoffin/dcraw/)  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://freedesktop.org/wiki/Software/shared-mime-info](http://freedesktop.org/wiki/Software/shared-mime-info)
> 
> &nbsp;&nbsp;\* Python + chardet library  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://chardet.feedparser.org/](http://chardet.feedparser.org/)
> 
> Install  
> -------
> 
> &nbsp;&nbsp;De-compress archive and enter its top directory.  
> &nbsp;&nbsp;Then type:
> 
> &nbsp;&nbsp;&nbsp;($ su)  
> &nbsp;&nbsp;&nbsp;&nbsp;# ruby setup.rb
> 
> &nbsp;&nbsp;These simple step installs this program under the default  
> &nbsp;&nbsp;location of Ruby libraries. You can also install files into  
> &nbsp;&nbsp;your favorite directory by supplying setup.rb some options.  
> &nbsp;&nbsp;Try "ruby setup.rb --help".
> 
> Appendix A: Additional metadata fields  
> --------------------------------------
> 
> &nbsp;&nbsp;This list contains the metadata fields added to the shared  
> &nbsp;&nbsp;file metadata spec.  
> &nbsp;&nbsp;[http://wiki.freedesktop.org/wiki/Specifications/shared-filemetadata-spec](http://wiki.freedesktop.org/wiki/Specifications/shared-filemetadata-spec)
> 
> &nbsp;&nbsp;field name | field type  
> &nbsp;&nbsp;----------------------------------------------------------------------  
> &nbsp;&nbsp;Archive.Contents array of pathnames
> 
> &nbsp;&nbsp;Audio.Band string  
> &nbsp;&nbsp;Audio.Composer string  
> &nbsp;&nbsp;Audio.Conductor string  
> &nbsp;&nbsp;Audio.Copyright string (copyright message)  
> &nbsp;&nbsp;Audio.Grouping string  
> &nbsp;&nbsp;Audio.Image binary string (embedded image data)  
> &nbsp;&nbsp;Audio.InterpretedBy string  
> &nbsp;&nbsp;Audio.Lyricist string  
> &nbsp;&nbsp;Audio.Publisher string  
> &nbsp;&nbsp;Audio.RemixedBy string  
> &nbsp;&nbsp;Audio.Subtitle string  
> &nbsp;&nbsp;Audio.Tempo integer  
> &nbsp;&nbsp;Audio.VariableBitrate boolean  
> &nbsp;&nbsp;Audio.Writer string  
> &nbsp;&nbsp;Audio.Publicationright string  
> &nbsp;&nbsp;Audio.File string  
> &nbsp;&nbsp;Audio.EAN/UPC string  
> &nbsp;&nbsp;Audio.ISBN string  
> &nbsp;&nbsp;Audio.Catalog string  
> &nbsp;&nbsp;Audio.LC string  
> &nbsp;&nbsp;Audio.Media string  
> &nbsp;&nbsp;Audio.Index string  
> &nbsp;&nbsp;Audio.Related string  
> &nbsp;&nbsp;Audio.ISRC string  
> &nbsp;&nbsp;Audio.Abstract string  
> &nbsp;&nbsp;Audio.Language string  
> &nbsp;&nbsp;Audio.Bibliography string  
> &nbsp;&nbsp;Audio.Introplay string  
> &nbsp;&nbsp;Audio.Dummy string  
> &nbsp;&nbsp;Audio.DebutAlbum string  
> &nbsp;&nbsp;Audio.RecordDate string  
> &nbsp;&nbsp;Audio.RecordLocation string
> 
> &nbsp;&nbsp;Doc.Album string  
> &nbsp;&nbsp;Doc.Artist string  
> &nbsp;&nbsp;Doc.Charset string  
> &nbsp;&nbsp;Doc.Description string  
> &nbsp;&nbsp;Doc.Genre string  
> &nbsp;&nbsp;Doc.Language string  
> &nbsp;&nbsp;Doc.ModifyDate date  
> &nbsp;&nbsp;Doc.PageSizeName string (A4, A5, letter, ...)
> 
> &nbsp;&nbsp;File.Software string (software used to create the file)
> 
> &nbsp;&nbsp;Image.DateCreated date  
> &nbsp;&nbsp;Image.DateTimeCreated date  
> &nbsp;&nbsp;Image.DateTimeOriginal date  
> &nbsp;&nbsp;Image.DimensionUnit string (px, mm, pt, ...)  
> &nbsp;&nbsp;Image.EXIF string (exiftool output)  
> &nbsp;&nbsp;Image.Frames integer  
> &nbsp;&nbsp;Image.Modified date  
> &nbsp;&nbsp;Image.OriginatingProgram string
> 
> &nbsp;&nbsp;Location.Latitude float  
> &nbsp;&nbsp;Location.Longitude float
> 
> &nbsp;&nbsp;Video.Album string  
> &nbsp;&nbsp;Video.Artist string  
> &nbsp;&nbsp;Video.Bitrate integer  
> &nbsp;&nbsp;Video.Codec string  
> &nbsp;&nbsp;Video.Comment string  
> &nbsp;&nbsp;Video.Duration float  
> &nbsp;&nbsp;Video.Framerate float (frames per second)  
> &nbsp;&nbsp;Video.Genre string  
> &nbsp;&nbsp;Video.ReleaseDate date  
> &nbsp;&nbsp;Video.Title string  
> &nbsp;&nbsp;Video.TrackNo integer
> 
> &nbsp;&nbsp;BitTorrent.Files array of {'path' =\> string, 'length' =\> integer}  
> &nbsp;&nbsp;BitTorrent.Length integer (size of single-file torrents)  
> &nbsp;&nbsp;BitTorrent.Announce string (announce url)  
> &nbsp;&nbsp;BitTorrent.AnnounceList array of arrays of strings  
> &nbsp;&nbsp;BitTorrent.Nodes array of [hostname, port] -arrays
> 
> Appendix B: The MDH file format  
> -------------------------------
> 
> &nbsp;&nbsp;MDH files are built as follows:
> 
> &nbsp;&nbsp;bytes | content  
> &nbsp;&nbsp;---------------  
> &nbsp;&nbsp;&nbsp;&nbsp;3 | "MDH" - MDH file format identifier  
> &nbsp;&nbsp;&nbsp;&nbsp;1 | "\x01" - MDH file format version number  
> &nbsp;&nbsp;&nbsp;&nbsp;4 | Long, network byte order - the size of the metadata struct in bytes  
> &nbsp;&nbsp;&nbsp;var | YAML - The MDH metadata struct  
> &nbsp;&nbsp;&nbsp;var | The actual file contents
> 
> &nbsp;&nbsp;All string fields in the metadata are UTF-8.
> 
> License  
> -------
> 
> &nbsp;&nbsp;Ruby's
> 
> --  
> Ilmari Heikkinen \<ilmari.heikkinen gmail com\>
> 
> > **[fhtr](http://fhtr.blogspot.com)**
> >
> > art with code

---

<div class="post-metadata">

### Author: ![Konrad\_Meyer](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@Konrad\_Meyer](https://rubytalk.org/u/Konrad_Meyer)
#### Post date: [20 September 2007 07:01 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/2 "2007-09-20T07:01:58Z")

</div>

Quoth Ilmari Heikkinen:

> Getting close to the 1.0 release of the metadata library.  
> If there are no major problems with this release candidate, that is.
> 
> tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)  
> git: [http://dark.fhtr.org/repos/metadata](http://dark.fhtr.org/repos/metadata)
> 
> Changes  
> -------  
> &nbsp;&nbsp;\* bittorrent .torrent support  
> &nbsp;&nbsp;\* untested ape/musepack/wavepack support with apetag gem  
> &nbsp;&nbsp;&nbsp;&nbsp;(couldn't find any ape samples)  
> &nbsp;&nbsp;\* 'name' and 'author' parsed from mplayer output  
> &nbsp;&nbsp;\* more documentation  
> &nbsp;&nbsp;\* better handling of images that have no exif info  
> &nbsp;&nbsp;\* tested ra, wma and m4a  
> &nbsp;&nbsp;\* tested more image formats  
> &nbsp;&nbsp;\* fixed audio samplerate and channels for videos  
> &nbsp;&nbsp;&nbsp;&nbsp;(i.e. convert the string to int.)  
> &nbsp;&nbsp;\* bin/mdh now prints the metadata as the default action.  
> &nbsp;&nbsp;&nbsp;&nbsp;Use -c to create an MDH file.  
> &nbsp;&nbsp;\* MDH files have a "MDH#{version\_byte}" header now,  
> &nbsp;&nbsp;&nbsp;&nbsp;the validity of which is checked by mdh.
> 
> Thanks  
> ------
> 
> &nbsp;&nbsp;Konrad Meyer for his patient testing and bug reports.  
> &nbsp;&nbsp;Darren Kirby for the heads-up on wmainfo's ASF-parsing capabilities  
> &nbsp;&nbsp;(along with being the author of wmainfo-rb and flacinfo-rb.)
> 
> Description  
> -----------
> 
> &nbsp;&nbsp;This package `Metadata' comes with a library called `metadata' and  
> &nbsp;&nbsp;a small program called `mdh'.
> 
> &nbsp;&nbsp;The library probes files for their metadata (e.g. jpeg dimensions  
> &nbsp;&nbsp;and camera make, mp3 artist, pdf text and word count) and returns the  
> &nbsp;&nbsp;metadata as a Hash. All strings in the metadata are converted to UTF-8.
> 
> &nbsp;&nbsp;The `mdh'-program can print out file metadata as YAML and package the  
> &nbsp;&nbsp;metadata with the file.
> 
> &nbsp;&nbsp;The metadata hash follows the shared file metadata spec naming, with some  
> &nbsp;&nbsp;additional fields, see list at the end of this file (Appendix A.)
> 
> &nbsp;&nbsp;For details on the MDH file format, see the end of this file (Appendix B.)
> 
> Usage  
> -----
> 
> &nbsp;&nbsp;# print out metadata for myfile.jpg  
> &nbsp;&nbsp;mdh myfile.jpg
> 
> &nbsp;&nbsp;# create myfile.jpg.mdh, which consists of an MDH metadata header +

myfile.jpg

> &nbsp;&nbsp;mdh -c myfile.jpg
> 
> &nbsp;&nbsp;# print out the metadata header from an MDH file  
> &nbsp;&nbsp;mdh -e -p myfile.jpg.mdh
> 
> &nbsp;&nbsp;# strip out the metadata header from an MDH file and save it to myfile.jpg  
> &nbsp;&nbsp;mdh -e myfile.jpg.mdh
> 
> &nbsp;&nbsp;# print out the list of options  
> &nbsp;&nbsp;mdh -h
> 
> &nbsp;&nbsp;\> require 'metadata'  
> &nbsp;&nbsp;\> Metadata.extract('myfile.jpg')  
> &nbsp;&nbsp;\> Metadata.extract\_text('myfile.pdf')  
> &nbsp;&nbsp;\> Pathname.new("myfile.jpg").metadata
> 
> List of supported formats  
> -------------------------
> 
> &nbsp;&nbsp;Audio:  
> &nbsp;&nbsp;&nbsp;&nbsp;Whatever you manage to make mplayer play.  
> &nbsp;&nbsp;&nbsp;&nbsp;Plus special handlers for FLAC, m4a, ape, musepack, wavepack and wma.  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mp3, flac, ogg, wav, ra, wma, m4a  
> &nbsp;&nbsp;&nbsp;&nbsp;Should also work:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wv, mpc, ape
> 
> &nbsp;&nbsp;Video:  
> &nbsp;&nbsp;&nbsp;&nbsp;Whatever you manage to make mplayer play.  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wmv, mov, divx, xvid, flv, ogm, mpg, mkv
> 
> &nbsp;&nbsp;Images:  
> &nbsp;&nbsp;&nbsp;&nbsp;Should handle pretty much anything (apart from ORF.)  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jpeg, png, gif, nef, dng, crw, pef, psd, tga, tif, xcf, xpm, ppm, bmp
> 
> &nbsp;&nbsp;Documents:  
> &nbsp;&nbsp;&nbsp;&nbsp;Successfully tested with:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pdf, ppt, odp, sxi, ps, ps.gz, html, txt  
> &nbsp;&nbsp;&nbsp;&nbsp;Should work:  
> &nbsp;&nbsp;&nbsp;&nbsp;- OpenOffice docs work to some degree (personally, I'm using unoconv to  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;convert OO docs to temp PDFs for the text & dimensions extraction, so  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;those bits of data are missing.)  
> &nbsp;&nbsp;&nbsp;&nbsp;- MS Office docs to some degree (ppt at least, doc and xls should work

too,

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimensions missing due to the above temp PDF -thing.)
> 
> &nbsp;&nbsp;Others:  
> &nbsp;&nbsp;&nbsp;&nbsp;- BitTorrent .torrent files  
> &nbsp;&nbsp;&nbsp;&nbsp;- Archive contents  
> &nbsp;&nbsp;&nbsp;&nbsp;- Whatever `extract' outputs and I am handling
> 
> Requirements  
> ------------
> 
> &nbsp;&nbsp;\* Ruby 1.8
> 
> &nbsp;&nbsp;\* Tons of metadata extraction programs and libs.  
> &nbsp;&nbsp;&nbsp;&nbsp;This package has many dependencies since there is no single universal  
> &nbsp;&nbsp;&nbsp;&nbsp;metadata header format that all files use. Blame resource forks,

filename

> &nbsp;&nbsp;&nbsp;&nbsp;extensions, bags of bytes and mimetypes.
> 
> &nbsp;&nbsp;&nbsp;&nbsp;List of gems:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flacinfo-rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wmainfo-rb  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP4info  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id3lib-ruby  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;apetag
> 
> &nbsp;&nbsp;&nbsp;&nbsp;List of Debian packages:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dcraw  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libimlib2-ruby  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extract  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libimage-exiftool-perl  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poppler-utils  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mplayer  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html2text  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imagemagick  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unhtml  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pstotext  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;antiword  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catdoc  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shared-mime-info
> 
> &nbsp;&nbsp;\* You do want to install the latest versions of dcraw and  
> &nbsp;&nbsp;&nbsp;&nbsp;shared-mime-info to be able to handle camera raw images.  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://cybercom.net/~dcoffin/dcraw/](http://cybercom.net/~dcoffin/dcraw/)  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://freedesktop.org/wiki/Software/shared-mime-info](http://freedesktop.org/wiki/Software/shared-mime-info)
> 
> &nbsp;&nbsp;\* Python + chardet library  
> &nbsp;&nbsp;&nbsp;&nbsp;[http://chardet.feedparser.org/](http://chardet.feedparser.org/)
> 
> Install  
> -------
> 
> &nbsp;&nbsp;De-compress archive and enter its top directory.  
> &nbsp;&nbsp;Then type:
> 
> &nbsp;&nbsp;&nbsp;($ su)  
> &nbsp;&nbsp;&nbsp;&nbsp;# ruby setup.rb
> 
> &nbsp;&nbsp;These simple step installs this program under the default  
> &nbsp;&nbsp;location of Ruby libraries. You can also install files into  
> &nbsp;&nbsp;your favorite directory by supplying setup.rb some options.  
> &nbsp;&nbsp;Try "ruby setup.rb --help".
> 
> Appendix A: Additional metadata fields  
> --------------------------------------
> 
> &nbsp;&nbsp;This list contains the metadata fields added to the shared  
> &nbsp;&nbsp;file metadata spec.  
> &nbsp;&nbsp;[shared-filemetadata-spec](http://wiki.freedesktop.org/wiki/Specifications/shared-filemetadata-spec)
> 
> &nbsp;&nbsp;field name | field type  
> &nbsp;&nbsp;----------------------------------------------------------------------  
> &nbsp;&nbsp;Archive.Contents array of pathnames
> 
> &nbsp;&nbsp;Audio.Band string  
> &nbsp;&nbsp;Audio.Composer string  
> &nbsp;&nbsp;Audio.Conductor string  
> &nbsp;&nbsp;Audio.Copyright string (copyright message)  
> &nbsp;&nbsp;Audio.Grouping string  
> &nbsp;&nbsp;Audio.Image binary string (embedded image data)  
> &nbsp;&nbsp;Audio.InterpretedBy string  
> &nbsp;&nbsp;Audio.Lyricist string  
> &nbsp;&nbsp;Audio.Publisher string  
> &nbsp;&nbsp;Audio.RemixedBy string  
> &nbsp;&nbsp;Audio.Subtitle string  
> &nbsp;&nbsp;Audio.Tempo integer  
> &nbsp;&nbsp;Audio.VariableBitrate boolean  
> &nbsp;&nbsp;Audio.Writer string  
> &nbsp;&nbsp;Audio.Publicationright string  
> &nbsp;&nbsp;Audio.File string  
> &nbsp;&nbsp;Audio.EAN/UPC string  
> &nbsp;&nbsp;Audio.ISBN string  
> &nbsp;&nbsp;Audio.Catalog string  
> &nbsp;&nbsp;Audio.LC string  
> &nbsp;&nbsp;Audio.Media string  
> &nbsp;&nbsp;Audio.Index string  
> &nbsp;&nbsp;Audio.Related string  
> &nbsp;&nbsp;Audio.ISRC string  
> &nbsp;&nbsp;Audio.Abstract string  
> &nbsp;&nbsp;Audio.Language string  
> &nbsp;&nbsp;Audio.Bibliography string  
> &nbsp;&nbsp;Audio.Introplay string  
> &nbsp;&nbsp;Audio.Dummy string  
> &nbsp;&nbsp;Audio.DebutAlbum string  
> &nbsp;&nbsp;Audio.RecordDate string  
> &nbsp;&nbsp;Audio.RecordLocation string
> 
> &nbsp;&nbsp;Doc.Album string  
> &nbsp;&nbsp;Doc.Artist string  
> &nbsp;&nbsp;Doc.Charset string  
> &nbsp;&nbsp;Doc.Description string  
> &nbsp;&nbsp;Doc.Genre string  
> &nbsp;&nbsp;Doc.Language string  
> &nbsp;&nbsp;Doc.ModifyDate date  
> &nbsp;&nbsp;Doc.PageSizeName string (A4, A5, letter, ...)
> 
> &nbsp;&nbsp;File.Software string (software used to create the file)
> 
> &nbsp;&nbsp;Image.DateCreated date  
> &nbsp;&nbsp;Image.DateTimeCreated date  
> &nbsp;&nbsp;Image.DateTimeOriginal date  
> &nbsp;&nbsp;Image.DimensionUnit string (px, mm, pt, ...)  
> &nbsp;&nbsp;Image.EXIF string (exiftool output)  
> &nbsp;&nbsp;Image.Frames integer  
> &nbsp;&nbsp;Image.Modified date  
> &nbsp;&nbsp;Image.OriginatingProgram string
> 
> &nbsp;&nbsp;Location.Latitude float  
> &nbsp;&nbsp;Location.Longitude float
> 
> &nbsp;&nbsp;Video.Album string  
> &nbsp;&nbsp;Video.Artist string  
> &nbsp;&nbsp;Video.Bitrate integer  
> &nbsp;&nbsp;Video.Codec string  
> &nbsp;&nbsp;Video.Comment string  
> &nbsp;&nbsp;Video.Duration float  
> &nbsp;&nbsp;Video.Framerate float (frames per second)  
> &nbsp;&nbsp;Video.Genre string  
> &nbsp;&nbsp;Video.ReleaseDate date  
> &nbsp;&nbsp;Video.Title string  
> &nbsp;&nbsp;Video.TrackNo integer
> 
> &nbsp;&nbsp;BitTorrent.Files array of {'path' =\> string, 'length' =\> integer}  
> &nbsp;&nbsp;BitTorrent.Length integer (size of single-file torrents)  
> &nbsp;&nbsp;BitTorrent.Announce string (announce url)  
> &nbsp;&nbsp;BitTorrent.AnnounceList array of arrays of strings  
> &nbsp;&nbsp;BitTorrent.Nodes array of [hostname, port] -arrays
> 
> Appendix B: The MDH file format  
> -------------------------------
> 
> &nbsp;&nbsp;MDH files are built as follows:
> 
> &nbsp;&nbsp;bytes | content  
> &nbsp;&nbsp;---------------  
> &nbsp;&nbsp;&nbsp;&nbsp;3 | "MDH" - MDH file format identifier  
> &nbsp;&nbsp;&nbsp;&nbsp;1 | "\x01" - MDH file format version number  
> &nbsp;&nbsp;&nbsp;&nbsp;4 | Long, network byte order - the size of the metadata struct in

bytes

> &nbsp;&nbsp;&nbsp;var | YAML - The MDH metadata struct  
> &nbsp;&nbsp;&nbsp;var | The actual file contents
> 
> &nbsp;&nbsp;All string fields in the metadata are UTF-8.
> 
> License  
> -------
> 
> &nbsp;&nbsp;Ruby's
> 
> --  
> Ilmari Heikkinen \<ilmari.heikkinen gmail com\>  
> [http://fhtr.blogspot.com](http://fhtr.blogspot.com)

I'm getting some issues with .torrents. Ex:  
$ mdh -p Fedora-7-i386.torrent undefined method `to\_utf8' for  
&nbsp;&nbsp;&nbsp;&nbsp;["F-7-i386-DVD.iso"]:Array  
&nbsp;&nbsp;undefined method `to\_utf8' for ["F-7-i386-DVD.iso"]:Array  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:822:in `enc\_utf8'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:452:in  
&nbsp;&nbsp;&nbsp;&nbsp;`application\_x\_bittorrent'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in `map'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in  
&nbsp;&nbsp;&nbsp;&nbsp;`application\_x\_bittorrent'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `\_\_send\_\_'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `extract'  
&nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:38:in `metadata'  
(wrapped lines indented.)

HTH,

> **···**
>
> --  
> Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)

---

<div class="post-metadata">

### Author: ![\_Pena\_Botp1](https://avatars.discourse-cdn.com/v4/letter/_/94ad74/32.png) [@\_Pena\_Botp1](https://rubytalk.org/u/_Pena_Botp1)
#### Post date: [21 September 2007 04:42 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/3 "2007-09-21T04:42:53Z")

</div>

# tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)

is it possible for a gem?  
will this run on windows?

kind regards -botp

> **···**
>
> From: Ilmari Heikkinen [[mailto:ilmari.heikkinen@gmail.com](mailto:ilmari.heikkinen@gmail.com)]

---

<div class="post-metadata">

### Author: ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)
#### Post date: [20 September 2007 08:01 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/4 "2007-09-20T08:01:51Z")

</div>

> I'm getting some issues with .torrents. Ex:  
> $ mdh -p Fedora-7-i386.torrent undefined method `to\_utf8' for  
> &nbsp;&nbsp;&nbsp;&nbsp;["F-7-i386-DVD.iso"]:Array  
> &nbsp;&nbsp;undefined method `to\_utf8' for ["F-7-i386-DVD.iso"]:Array  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:822:in `enc\_utf8'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:452:in  
> &nbsp;&nbsp;&nbsp;&nbsp;`application\_x\_bittorrent'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in `map'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in  
> &nbsp;&nbsp;&nbsp;&nbsp;`application\_x\_bittorrent'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `\_\_send\_\_'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `extract'  
> &nbsp;&nbsp;/usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:38:in `metadata'  
> (wrapped lines indented.)

Thanks, fixed. Along with extracting more metadata from .torrents  
and handling flacs with id3 tags better.

[http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz)

> **···**
>
> On 9/20/07, Konrad Meyer \<konrad@tylerc.org\> wrote:
> 
> > HTH,  
> > --  
> > Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)
> 
> --  
> Ilmari Heikkinen
> 
> > **[fhtr](http://fhtr.blogspot.com)**
> >
> > art with code

---

<div class="post-metadata">

### Author: ![Konrad\_Meyer](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@Konrad\_Meyer](https://rubytalk.org/u/Konrad_Meyer)
#### Post date: [21 September 2007 05:14 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/5 "2007-09-21T05:14:03Z")

</div>

Quoth Peña, Botp:

> From: Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]  
> # tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)
> 
> is it possible for a gem?  
> will this run on windows?
> 
> kind regards -botp

In short, no (to both).  
In earlier messages I asked for a gem too, and it turns out this is hard to do  
because of a python script that's included. And as far as windows, I think a  
lot of this relies on shelling out, which windows... doesn't have. So you  
might look for another solution (or go to \*nix).

HTH,

> **···**
>
> --  
> Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)

---

<div class="post-metadata">

### Author: ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)
#### Post date: [21 September 2007 05:17 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/6 "2007-09-21T05:17:24Z")

</div>

> From: Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]  
> # tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)
> 
> is it possible for a gem?

If there's a way to install bin/chardet as-is, now gem adds  
"#!/usr/bin/ruby"-boilerplate (which doesn't quite work for a  
python script.) ...Though, I could always turn it into a ruby script  
that executes a bit of python. So, yeah, it is possible. I'll build one.

> will this run on windows?

In theory. At least the Ruby parts (i.e. wma, flac, mp3, torrents.)  
No idea if you can get the external programs and libs installed and  
running, sounds unlikely. But hey, feel free to prove me wrong 🙂

> **···**
>
> On 9/21/07, Peña, Botp \<botp@delmonte-phil.com\> wrote:
> 
> > kind regards -botp
> 
> --  
> Ilmari Heikkinen
> 
> > **[fhtr](http://fhtr.blogspot.com)**
> >
> > art with code

---

<div class="post-metadata">

### Author: ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)
#### Post date: [20 September 2007 09:41 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/7 "2007-09-20T09:41:22Z")

</div>

Oh, and, if there are any other filetypes that could do with more  
metadata, feel free to request. Especially if some other program  
shows it. And still more especially if the other program is a  
cmdline app with a debian package 😉

> **···**
>
> On 9/20/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:
> 
> > On 9/20/07, Konrad Meyer \<konrad@tylerc.org\> wrote:  
> > \> I'm getting some issues with .torrents. Ex:  
> > \> $ mdh -p Fedora-7-i386.torrent undefined method `to\_utf8' for  
> > \> ["F-7-i386-DVD.iso"]:Array  
> > \> undefined method `to\_utf8' for ["F-7-i386-DVD.iso"]:Array  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:822:in `enc\_utf8'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:452:in  
> > \> `application\_x\_bittorrent'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in `map'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in  
> > \> `application\_x\_bittorrent'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `\_\_send\_\_'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `extract'  
> > \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:38:in `metadata'  
> > \> (wrapped lines indented.)  
> > \>
> > 
> > Thanks, fixed. Along with extracting more metadata from .torrents  
> > and handling flacs with id3 tags better.
> > 
> > [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz)

---

<div class="post-metadata">

### Author: ![Ilmari\_Heikkinen](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@Ilmari\_Heikkinen](https://rubytalk.org/u/Ilmari_Heikkinen)
#### Post date: [21 September 2007 06:00 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/8 "2007-09-21T06:00:38Z")

</div>

Or, one could make a VMWare image or somesuch and use it as a  
metadata appliance. Anyone know how that might work best?

> **···**
>
> On 9/21/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:
> 
> > On 9/21/07, Peña, Botp \<botp@delmonte-phil.com\> wrote:  
> > \> From: Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]  
> > \> # tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)  
> > \>  
> > \> is it possible for a gem?
> > 
> > If there's a way to install bin/chardet as-is, now gem adds  
> > "#!/usr/bin/ruby"-boilerplate (which doesn't quite work for a  
> > python script.) ...Though, I could always turn it into a ruby script  
> > that executes a bit of python. So, yeah, it is possible. I'll build one.
> > 
> > \> will this run on windows?
> > 
> > In theory. At least the Ruby parts (i.e. wma, flac, mp3, torrents.)  
> > No idea if you can get the external programs and libs installed and  
> > running, sounds unlikely. But hey, feel free to prove me wrong 🙂

---

<div class="post-metadata">

### Author: ![Konrad\_Meyer](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@Konrad\_Meyer](https://rubytalk.org/u/Konrad_Meyer)
#### Post date: [20 September 2007 13:59 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/9 "2007-09-20T13:59:35Z")

</div>

Quoth Ilmari Heikkinen:

> **···**
>
> > On 9/20/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:  
> > \> On 9/20/07, Konrad Meyer \<konrad@tylerc.org\> wrote:  
> > \> \> I'm getting some issues with .torrents. Ex:  
> > \> \> $ mdh -p Fedora-7-i386.torrent undefined method `to\_utf8' for  
> > \> \> ["F-7-i386-DVD.iso"]:Array  
> > \> \> undefined method `to\_utf8' for ["F-7-i386-DVD.iso"]:Array  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:822:in `enc\_utf8'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:452:in  
> > \> \> `application\_x\_bittorrent'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in `map'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in  
> > \> \> `application\_x\_bittorrent'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `\_\_send\_\_'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `extract'  
> > \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:38:in `metadata'  
> > \> \> (wrapped lines indented.)  
> > \> \>  
> > \>  
> > \> Thanks, fixed. Along with extracting more metadata from .torrents  
> > \> and handling flacs with id3 tags better.  
> > \>  
> > \> [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz)
> > 
> > Oh, and, if there are any other filetypes that could do with more  
> > metadata, feel free to request. Especially if some other program  
> > shows it. And still more especially if the other program is a  
> > cmdline app with a debian package 😉
> 
> I've actually been doing all this testing under Fedora 7, all the packages  
> needed are here IIRC but they may have slightly different names (especially  
> debian -dev -\> fedora -devel).
> 
> --  
> Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)

---

<div class="post-metadata">

### Author: ![Konrad\_Meyer](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@Konrad\_Meyer](https://rubytalk.org/u/Konrad_Meyer)
#### Post date: [20 September 2007 14:08 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/10 "2007-09-20T14:08:47Z")

</div>

Quoth Ilmari Heikkinen:

> \> \> I'm getting some issues with .torrents. Ex:  
> \> \> $ mdh -p Fedora-7-i386.torrent undefined method `to\_utf8' for  
> \> \> ["F-7-i386-DVD.iso"]:Array  
> \> \> undefined method `to\_utf8' for ["F-7-i386-DVD.iso"]:Array  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:822:in `enc\_utf8'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:452:in  
> \> \> `application\_x\_bittorrent'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in `map'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:451:in  
> \> \> `application\_x\_bittorrent'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `\_\_send\_\_'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:146:in `extract'  
> \> \> /usr/lib/ruby/site\_ruby/1.8/metadata/extract.rb:38:in `metadata'  
> \> \> (wrapped lines indented.)  
> \> \>  
> \>  
> \> Thanks, fixed. Along with extracting more metadata from .torrents  
> \> and handling flacs with id3 tags better.  
> \>  
> \> [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc3.tar.gz)
> 
> Oh, and, if there are any other filetypes that could do with more  
> metadata, feel free to request. Especially if some other program  
> shows it. And still more especially if the other program is a  
> cmdline app with a debian package 😉

Very cool:

&nbsp;&nbsp;$ mdh a-downloads/Fedora-7-i386.torrent ---  
&nbsp;&nbsp;Doc.Created: 2007-05-29T10:58:50-07:00  
&nbsp;&nbsp;BitTorrent.Name: Fedora-7-i386  
&nbsp;&nbsp;BitTorrent.Files:  
&nbsp;&nbsp;- length: 2900602880  
&nbsp;&nbsp;&nbsp;&nbsp;path: F-7-i386-DVD.iso  
&nbsp;&nbsp;- length: 101816320  
&nbsp;&nbsp;&nbsp;&nbsp;path: F-7-i386-rescuecd.iso  
&nbsp;&nbsp;- length: 359  
&nbsp;&nbsp;&nbsp;&nbsp;path: SHA1SUM  
&nbsp;&nbsp;BitTorrent.PieceLength: 262144  
&nbsp;&nbsp;Doc.Title: Fedora-7-i386  
&nbsp;&nbsp;BitTorrent.PieceCount: 11454  
&nbsp;&nbsp;File.Size: 229377  
&nbsp;&nbsp;File.Modified: 2007-05-31T06:28:34-07:00  
&nbsp;&nbsp;File.Format: application/x-bittorrent  
&nbsp;&nbsp;BitTorrent.Announce: [http://torrent.linux.duke.edu:6969/announce](http://torrent.linux.duke.edu:6969/announce)

Thanks a lot!

> **···**
>
> > On 9/20/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:  
> > \> On 9/20/07, Konrad Meyer \<konrad@tylerc.org\> wrote:
> 
> --  
> Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)

---

<div class="post-metadata">

### Author: ![Konrad\_Meyer](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@Konrad\_Meyer](https://rubytalk.org/u/Konrad_Meyer)
#### Post date: [21 September 2007 06:14 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/11 "2007-09-21T06:14:05Z")

</div>

Quoth Ilmari Heikkinen:

> **···**
>
> > On 9/21/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:  
> > \> On 9/21/07, Peña, Botp \<botp@delmonte-phil.com\> wrote:  
> > \> \> From: Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]  
> > \> \> # tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)  
> > \> \>  
> > \> \> is it possible for a gem?  
> > \>  
> > \> If there's a way to install bin/chardet as-is, now gem adds  
> > \> "#!/usr/bin/ruby"-boilerplate (which doesn't quite work for a  
> > \> python script.) ...Though, I could always turn it into a ruby script  
> > \> that executes a bit of python. So, yeah, it is possible. I'll build one.  
> > \>  
> > \> \> will this run on windows?  
> > \>  
> > \> In theory. At least the Ruby parts (i.e. wma, flac, mp3, torrents.)  
> > \> No idea if you can get the external programs and libs installed and  
> > \> running, sounds unlikely. But hey, feel free to prove me wrong 🙂  
> > \>
> > 
> > Or, one could make a VMWare image or somesuch and use it as a  
> > metadata appliance. Anyone know how that might work best?
> 
> Uglily, at best.
> 
> --  
> Konrad Meyer \<konrad@tylerc.org\> [http://konrad.sobertillnoon.com/](http://konrad.sobertillnoon.com/)

---

<div class="post-metadata">

### Author: ![Bill\_Kelly](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@Bill\_Kelly](https://rubytalk.org/u/Bill_Kelly)
#### Post date: [21 September 2007 09:44 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/12 "2007-09-21T09:44:50Z")

</div>

> > \> From: Ilmari Heikkinen [mailto:ilmari.heikkinen@gmail.com]  
> > \> # tarball: [http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz](http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz)  
> > \>  
> > \> is it possible for a gem?
> > 
> > If there's a way to install bin/chardet as-is, now gem adds  
> > "#!/usr/bin/ruby"-boilerplate (which doesn't quite work for a  
> > python script.) ...Though, I could always turn it into a ruby script  
> > that executes a bit of python. So, yeah, it is possible. I'll build one.
> > 
> > \> will this run on windows?
> > 
> > In theory. At least the Ruby parts (i.e. wma, flac, mp3, torrents.)  
> > No idea if you can get the external programs and libs installed and  
> > running, sounds unlikely. But hey, feel free to prove me wrong 🙂
> 
> Or, one could make a VMWare image or somesuch and use it as a  
> metadata appliance. Anyone know how that might work best?

Or perhaps build the external programs with cygwin?

(I think most cygwin programs only depend on cygwin1.dll which is  
about 1.2 meg on my system.)

Regards,

Bill

> **···**
>
> From: "Ilmari Heikkinen" \<ilmari.heikkinen@gmail.com\>
> 
> > On 9/21/07, Ilmari Heikkinen \<ilmari.heikkinen@gmail.com\> wrote:
> > 
> > > On 9/21/07, Peña, Botp \<botp@delmonte-phil.com\> wrote:

---

<div class="post-metadata">

### Author: ![\_Pena\_Botp1](https://avatars.discourse-cdn.com/v4/letter/_/94ad74/32.png) [@\_Pena\_Botp1](https://rubytalk.org/u/_Pena_Botp1)
#### Post date: [21 September 2007 13:01 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/13 "2007-09-21T13:01:26Z")

</div>

# (I think most cygwin programs only depend on cygwin1.dll  
# which is about 1.2 meg on my system.)

interesting, i didn't know that. So what is the minimum set of files needed to run cygwin? i'm asking since i haven't used one for a long long time now..

kind regards -botp

> **···**
>
> From: Bill Kelly [[mailto:billk@cts.com](mailto:billk@cts.com)]

---

<div class="post-metadata">

### Author: ![Bill\_Kelly](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@Bill\_Kelly](https://rubytalk.org/u/Bill_Kelly)
#### Post date: [21 September 2007 16:48 UTC](https://rubytalk.org/t/ann-metadata-1-0-rc2/40734/14 "2007-09-21T16:48:06Z")

</div>

> From: Bill Kelly [mailto:billk@cts.com]  
> # (I think most cygwin programs only depend on cygwin1.dll  
> # which is about 1.2 meg on my system.)
> 
> interesting, i didn't know that. So what is the minimum set of files needed to run  
> cygwin? i'm asking since i haven't used one for a long long time now..

It depends. (lol, pun not intended, but my next sentence was going to involve  
depend.exe)

Er... using depends.exe [1] one can view a tree of dependencies for a .exe or  
.dll file (among other object formats.)

A number of cygwin-compiled binaries only depend on cygwin1.dll. (Not  
counting windows modules like kernel32.dll.)

To verify this, I was successfully able to copy just cygwin1.dll and  
cygwin/bin/ftp.exe into a subdirectory elsewhere, and change the shell  
execution path to simply ".", and the program worked.

Other binaries, like cygwin/bin/ls.exe, required a couple extra .dll's  
(in this case for handling character set encodings) like cygintl-3.dll and  
cygiconv-2.dll

A more complex program like cygwin/bin/wget.exe still had minimal  
and reasonable dependencies: character set handling and crypto  
libraries:

&nbsp;&nbsp;cygwin1.dll, cygintl-3.dll, cygiconv-2.dll, cygcrypto-0.9.8.dll, cygssl-0.9.8.dll

So it appears the cygwin folks have done a nice job at avoiding  
dependency bloat.

[1] [http://www.dependencywalker.com/](http://www.dependencywalker.com/)

Regards,

Bill

> **···**
>
> From: "Peña, Botp" \<botp@delmonte-phil.com\>
