Rubygems | Latest Versions for taglib-rubyhttps://rubygems.org/gems2023-09-30T13:14:42Ztaglib-ruby (1.1.3)https://rubygems.org/gems/taglib-ruby/versions/1.1.32022-12-29T10:39:29ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (1.1.2)https://rubygems.org/gems/taglib-ruby/versions/1.1.22022-04-13T02:03:01ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (1.1.1)https://rubygems.org/gems/taglib-ruby/versions/1.1.12022-04-12T03:39:58ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (1.1.0)https://rubygems.org/gems/taglib-ruby/versions/1.1.02021-01-20T10:46:22ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (1.0.1)https://rubygems.org/gems/taglib-ruby/versions/1.0.12020-03-25T09:53:41ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (1.0.0)https://rubygems.org/gems/taglib-ruby/versions/1.0.02020-01-07T09:24:35ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.7.1)https://rubygems.org/gems/taglib-ruby/versions/0.7.12015-12-28T10:56:17ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.7.0)https://rubygems.org/gems/taglib-ruby/versions/0.7.02014-08-21T18:47:19ZRobin Stocker, Jacob Vosmaer, Thomas ChevereauRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.6.0-x86-mingw32)https://rubygems.org/gems/taglib-ruby/versions/0.6.0-x86-mingw322013-04-26T17:28:51ZRobin Stocker, Jacob VosmaerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.6.0)https://rubygems.org/gems/taglib-ruby/versions/0.6.02013-04-26T17:27:45ZRobin Stocker, Jacob VosmaerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.2)https://rubygems.org/gems/taglib-ruby/versions/0.5.22012-10-06T15:41:37ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.2-x86-mingw32)https://rubygems.org/gems/taglib-ruby/versions/0.5.2-x86-mingw322012-10-06T16:01:53ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.1-x86-mingw32)https://rubygems.org/gems/taglib-ruby/versions/0.5.1-x86-mingw322012-06-16T12:57:49ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.1)https://rubygems.org/gems/taglib-ruby/versions/0.5.12012-06-16T12:55:24ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.0)https://rubygems.org/gems/taglib-ruby/versions/0.5.02012-04-15T18:09:40ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.5.0-x86-mingw32)https://rubygems.org/gems/taglib-ruby/versions/0.5.0-x86-mingw322012-04-15T18:10:57ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library, for reading and writing
meta-data (tags) of many audio formats.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.4.0)https://rubygems.org/gems/taglib-ruby/versions/0.4.02012-03-18T14:58:13ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.4.0-x86-mingw32)https://rubygems.org/gems/taglib-ruby/versions/0.4.0-x86-mingw322012-03-18T14:59:26ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.3.1)https://rubygems.org/gems/taglib-ruby/versions/0.3.12012-01-22T15:35:50ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.3.0)https://rubygems.org/gems/taglib-ruby/versions/0.3.02012-01-02T14:41:20ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.2.1)https://rubygems.org/gems/taglib-ruby/versions/0.2.12011-11-05T14:35:13ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.2.0)https://rubygems.org/gems/taglib-ruby/versions/0.2.02011-10-22T15:46:17ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.1.1)https://rubygems.org/gems/taglib-ruby/versions/0.1.12011-09-17T20:20:08ZRobin StockerRuby interface for the taglib C++ library
Ruby interface for the taglib C++ library.
In contrast to other libraries, this one wraps the C++ API using SWIG,
not only the minimal C API. This means that all tags can be accessed.
taglib-ruby (0.1.0)https://rubygems.org/gems/taglib-ruby/versions/0.1.02011-09-17T14:51:24ZRobin StockerRuby interface for the complete taglib C++ library
taglib-ruby
===========
Ruby interface for the [TagLib C++ library][taglib].
In contrast to other libraries, this one wraps the full C++ API using
SWIG, not only the minimal C API. This means that all tags can be
accessed.
taglib-ruby is work in progress, here are some of the things still left
to do (contributors very welcome):
* Wrap TagLib::MPEG::Properties
* Pre-compiled Gem for Windows
* More coverage of the library besides ID3v2
Usage
-----
Here's an example for reading an ID3v2 tag:
require 'taglib'
# Load an ID3v2 tag from a file
file = TagLib::MPEG::File.new("wake_up.mp3")
tag = file.id3v2_tag
# Read basic attributes
tag.title #=> "Wake Up"
tag.artist #=> "Arcade Fire"
tag.track #=> 7
# Access all frames
tag.frame_list.size #=> 13
# Track frame
track = tag.frame_list('TRCK').first
track.to_s #=> "7/10"
# Attached picture frame
cover = tag.frame_list('APIC').first
cover.mime_type #=> "image/jpeg"
cover.picture #=> "\xFF\xD8\xFF\xE0\x00\x10JFIF..."
And here's an example for writing one:
file = TagLib::MPEG::File.new("joga.mp3")
tag = file.id3v2_tag
# Write basic attributes
tag.artist = "Björk"
tag.title = "Jóga"
# Add attached picture frame
apic = TagLib::ID3v2::AttachedPictureFrame.new
apic.mime_type = "image/jpeg"
apic.description = "Cover"
apic.type = TagLib::ID3v2::AttachedPictureFrame::FrontCover
apic.picture = File.open("cover.jpg", 'rb'){ |f| f.read }
tag.add_frame(apic)
file.save
### Encoding
By default, taglib stores text frames as ISO-8859-1 (Latin-1), if the
text contains only characters that are available in that encoding. If
not (e.g. with Cyrillic, Chinese, Japanese), it prints a warning and
stores the text as UTF-8.
When you already know that you want to store the text as UTF-8, you can
change the default text encoding:
frame_factory = TagLib::ID3v2::FrameFactory.instance
frame_factory.default_text_encoding = TagLib::String::UTF8
Another option is using the advanced API:
title = tag.frame_list('TIT2').first
title.text = "Jóga"
title.text_encoding = TagLib::String::UTF8
Contributing
------------
* Check out the latest master to make sure the feature hasn't been
implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't
requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it
in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you
want to have your own version, or is otherwise necessary, that is
fine, but please isolate to its own commit so I can cherry-pick around
it.
License
-------
taglib-ruby is distributed under the MIT License,
see LICENSE.txt for details.
Copyright (c) 2010, 2011 Robin Stocker.
[taglib]: http://developer.kde.org/~wheeler/taglib.html