# Id3lib-ruby 0.1.0 (first release)

**URL:** <https://www.ruby-forum.com/t/id3lib-ruby-0-1-0-first-release/58693>\
**Category:** Ruby\
**Created:** [April 24, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/id3lib-ruby-0-1-0-first-release/58693 "2006-04-24T22:07:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschuil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rschuil](https://www.ruby-forum.com/u/rschuil)\
**Post date:** [April 24, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/id3lib-ruby-0-1-0-first-release/58693/1 "2006-04-24T22:07:59Z")

</div>

Hi,

I’m glad to announce the first release of id3lib-ruby. It’s a project I  
started some time ago and thought someone else may find useful, so here  
it is 🙂

[http://id3lib-ruby.rubyforge.org/](http://id3lib-ruby.rubyforge.org/)

== Description

id3lib-ruby provides a Ruby interface to the id3lib C++ library for  
easily editing ID3 tags (v1 and v2) like with pyid3lib. Because the  
extension is based on SWIG, already most of the features of id3lib are  
implemented.

== Features

- Read and write ID3v1 or ID3v2 tags
- Simple interface for adding, changing and removing frames
- Quick access to common text frames like title and performer
- Custom data frames like attached picture (APIC)
- Pretty complete coverage of id3lib’s features
- UTF-16 support

== Installation

Installation through Rubygems:

gem install id3lib-ruby

Note that you need to have id3lib installed as id3lib-ruby is only a  
wrapper library.

== Usage

require ‘rubygems’  
require ‘id3lib’

# Load a tag from a file

tag = ID3Lib::Tag.new(‘talk.mp3’)

# Get and set text frames with convenience methods

tag.title #=\> “Talk”  
tag.album = ‘X&Y’  
tag.track = ‘5/13’

# Tag is a subclass of Array and each frame is a Hash

tag[0]  
#=\> { :id =\> :TPE1, :textenc =\> 0, :text =\> “Coldplay” }

# Get the number of frames

tag.length #=\> 7

# Remove all comment frames

tag.delete\_if{ |frame| frame[:id] == :COMM }

# Add an attached picture frame

cover = {  
:id =\> :APIC,  
:mimetype =\> ‘image/jpeg’,  
:picturetype =\> 3,  
:description =\> ‘A pretty picture’,  
:textenc =\> 0,  
:data =\> File.read(‘cover.jpg’)  
}  
tag \<\< cover

# Last but not least, apply changes

tag.update!

== Planned

- win32 binary gem (with id3lib included)

Cheers,  
Robin S.

---

<div class="post-metadata">

**Author:** ![rschuil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rschuil](https://www.ruby-forum.com/u/rschuil)\
**Post date:** [April 25, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/id3lib-ruby-0-1-0-first-release/58693/2 "2006-04-25T18:45:21Z")

</div>

Thanks Robin, it looks great!

Cheers,  
Daniel
