flacinfo-rb
- Author: Darren Kirby
- mailto:darren@dragonbyte.ca
- License: GPL2
Quick API docs
Initializing
require 'flacinfo'
foo = FlacInfo.new("someSong.flac")
Public attributes
streaminfo- hash of STREAMINFO block metadataseektable- hash of arrays of seek pointscomment- array of VORBIS COMMENT block metadatatags- user-friendly hash of Vorbis comment metadata key=value pairsapplication- hash of APPLICATION block metadatapadding- hash of PADDING block metadatacuesheet- hash of CUESHEET block metadatapicture- hash of PICTURE block metadataflac_file- hash of APPLICATION Id 0x41544348 (Flac File) metadata if present
Public methods
comment_add- adds a commentcomment_del- deletes a commenthastag('str')- returns true if tags['str'] existsmeta_flac- prints all META BLOCKS. (Mostly) equivelant to 'metaflac --list'padding_add!(b)- adds a PADDING block of size 'b' or 4096 bytespadding_del!- deletes the PADDING blockpadding_resize!- resizes (grow or shrink) a padding block to size 'b' or 4096 bytesprint_seektable- pretty-print seektable hashprint_streaminfo- pretty-print streaminfo hashprint_tags- pretty-print tags hashraw_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 diskwrite_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.