0.01
No release in over 3 years
Low commit activity in last 3 years
flacinfo-rb is a pure Ruby library for low-level access to Flac files. You can use it to read, set, or delete 'id3' like data (Vorbis comments), delete, add, or resize padding blocks, and so on.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme
:: flacinfo-rb ::
Author: Darren Kirby
mailto:bulliver@gmail.com
License: GPL3

 = Quick API docs =

 == Initializing ==

require 'flacinfo'
foo = FlacInfo.new("someSong.flac")

 == Public attributes ==

streaminfo   :: hash of STREAMINFO block metadata
seektable    :: hash of arrays of seek points
comment      :: array of VORBIS COMMENT block metadata
tags         :: user-friendly hash of Vorbis comment metadata key=value pairs
application  :: hash of APPLICATION block metadata
padding      :: hash of PADDING block metadata
cuesheet     :: hash of CUESHEET block metadata
picture      :: hash of PICTURE block metadata
flac_file    :: hash of APPLICATION Id 0x41544348 (Flac File) metadata if present

 == Public methods ==

comment_add       :: adds a comment
comment_del       :: deletes a comment
hastag('str')     :: returns true if tags['str'] exists
meta_flac         :: prints all META BLOCKS. (Mostly) equivelant to 'metaflac --list'
padding_add!(b)   :: adds a PADDING block of size 'b' or 4096 bytes
padding_del!      :: deletes the PADDING block
padding_resize!   :: resizes (grow or shrink) a padding block to size 'b' or 4096 bytes
print_seektable   :: pretty-print seektable hash
print_streaminfo  :: pretty-print streaminfo hash
print_tags        :: pretty-print tags hash
raw_data_dump(?)  :: if passed a filename it will dump flac_file['raw_data'] to that file,
                       otherwise it will dump it to the console (even if binary!)
update!           :: writes comment changes to disk
write_picture(?)  :: write image from PICTURE block(s) to optional file

The public methods and attributes are very well documented in the source itself. Please read
there if you don't understand any of this. You can also use Rdoc to generate HTML documentation.

HELP: flacinfo-rb still does not parse cuesheets, as I have never encountered a flac file
that contains one. If you have a flac file with a cuesheet please consider emailing it to
me so I can add this remaining bit of code.