https://github.com/trinitronx/audio-cuefile-parserplus
A better CUE sheet parser written as a perl module. Supports Read/Write access and full CUE file specification.
https://github.com/trinitronx/audio-cuefile-parserplus
Last synced: about 1 month ago
JSON representation
A better CUE sheet parser written as a perl module. Supports Read/Write access and full CUE file specification.
- Host: GitHub
- URL: https://github.com/trinitronx/audio-cuefile-parserplus
- Owner: trinitronx
- License: other
- Created: 2009-11-01T05:26:32.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2020-02-02T22:01:31.000Z (over 6 years ago)
- Last Synced: 2025-02-27T09:12:23.111Z (over 1 year ago)
- Language: Perl
- Homepage: http://www.lyraphase.com
- Size: 31.3 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
NAME
Audio::Cuefile::ParserPlus - Class to read, write & manipulate CUE files
SYNOPSIS
use Audio::Cuefile::ParserPlus;
Class to parse a cuefile and access all available data within.
Can print track list, output cue files, or return a Audio::Cuefile::ParserPlus object
DESCRIPTION
Audio::Cuefile::ParserPlus was built using the CUE sheet file specification
found at:
http://digitalx.org/cuesheetsyntax.php
The internal data structure organizes the CUE sheet commands mainly by what are
considered 'global' attributes and those specific to a single 'TRACK'.
To print track specific attributes, use the printTracks() method.
USAGE
use Audio::Cuefile::ParserPlus;
$filepath = 'filename.cue';
# Create an empty object & read a file with readCUE()
my $cuefile = new Audio::Cuefile::ParserPlus();
$cuefile->readCUE($filepath);
# OR specify the file in the constructor:
my $other_cuefile = new Audio::Cuefile::ParserPlus($filepath);
# Print the track data
$cuefile->printTracks();
$other_cuefile->printTracks();
CLASS DOCUMENTATION
Here is some more detailed information about using the class:
Static Package Variables
@AUDIO::Cuefile::ParserPlus::CUESHEET_COMMANDS
- Array containing track specific cuesheet
commands in the order we want to print them
in (using printTracks)
$AUDIO::Cuefile::ParserPlus::DEBUG
- Turn debugging output on
readCUE
Usage : $cuefileparser->readCUE('path/to/cuefile.cue');
Purpose : Gives the parse a CUE sheet to read & parse, sets $self->CUEfilepath if not defined
Returns : Nothing! (Sets all member variables however)
Argument : filepath = path to a CUE sheet file. (optional)
: if no filepath given, uses $cuefileparser->CUEfilepath if defined
Throws : IOException::PathNotFound
Comment : After using readCUE(), you may access the member variables
: that it sets as public properties for ease of use.
See Also :
printTracks
Usage : $cuefileparser->printTracks();
Purpose : Print the parsed cue sheet @tracks array of hashes
Returns : Nothing! (prints output to console)
Constraint: Must have loaded a CUE sheet with readCUE first if you
: expect any output!
Throws : Nothing
Comment :
:
See Also :
openStripCUE
Usage : Meant for private use within Audio::Cuefile::ParserPlus
Purpose : Utility function to open & read entire CUE file, stripping
: any REM comments or blank lines.
Returns : String containing the stripped CUE file.
Argument : filepath = path to a CUE sheet file.
Throws : IOException::Read
Comment :
:
See Also :
writeCUE
Usage : $cuefileparser->writeCUE('path/to/cuefile.cue');
Purpose : Writes out a cuefile from the internal data structure.
: Uses $filepath if defined & writable, else writes
: to the current path stored in $self->CUEfilepath
Returns : Nothing!
Argument : filepath = path to a CUE sheet file. (optional)
: if no filepath given, uses $cuefileparser->CUEfilepath if defined
Throws : IOException::Write, IOException::PathNotFound
Comment : Will overwrite the file stored in $filepath if defined &
: writable, else $self->CUEfilepath if defined
See Also :
BUGS
Doesn't support multi-file CUE sheets yet! (TODO!)
Need INDEX 00 (pregap support)
Need INDEX >1 (subindex support)
SUPPORT
This module is provided as is, use at your own risk. If you *really*
need help, then you can email me at: jcuzella@lyraphase.com, or my
website http://www.lyraphase.com/
AUTHOR
James Cuzella
CPAN ID: JCUZELLA
.:[ HoTSC ]:.
jcuzella@lyraphase.com
http://www.lyraphase.com/
COPYRIGHT
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included
with this module.
SEE ALSO
perl(1).