flacinfo-rb

Author: Darren Kirby 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 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 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.