GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MP3::ARCHIVE::FORMAT (3)

.ds Aq ’

NAME

MP3::Archive::Format - Helper class for MP3::Archive

CONTENTS

SYNOPSIS



    use MP3::Archive::Format;
    my $f=MP3::Archive::Format->new;
    if($f->validate($file,$format) {
        print("Track num: ",$f->tracknum($file,$format),
              "Artist: ",$f->($file,$format),
              "Album: ",$f->($file,$format),
              "Track: ",$f->($file,$format),
              "Ext: ",$f->($file,$format),"\n");
    }
    print("Correct path: ",
          $f->makepathname($fromfile,$artist,$album,$format),"/",
          $f->makefilename($fromfile,$tracknum,$artist,$album,$track,$ext,$format),"\n");



DESCRIPTION

MP3::Archive::Format is a helper class for MP3::Archive. Many of the methods in it are essentially duplicates of ones in MP3::Archive(3), but with the formats specified explicitly rather than inferred from configuration. These are used internally, but can also be useful if you need more control from your application.

METHODS

    new

Creates an instance of MP3::Archive::Format

    tracknum, artist, album, track, ext, validate, makefilename, makepathname

These methods are essentially the same as their counterparts in MP3::Archive, with the exception that they expect a format as well as a filename (eg artist($file, $format), and do not take an optional tracktype. A format is a reference to an array of strings containing regular expressions. See MP3::Archive::Config(3) for details on formats.

INTERNAL METHODS

    replace($format,$var,$tag)

Replaces $tag with $var in $format. $tag can be one of TRKNUM, ARTIST, ALBUM, or TRACK.

    parse($file,$format,$tag)

Parse formats. $tag is the tag (eg ARTIST) we are interested in. Returns the matching data. If called in array context, also returns the offset of the start of that data.

BUGS

None known. Please report any found to ianb@nessie.mcc.ac.uk

SEE ALSO

MP3::Archive(3) MP3::Archive::Config(3), mp3lint(1), mp3-archive-tools(1)

AUTHOR

Ian Beckwith <ianb@nessie.mcc.ac.uk>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MP3::ARCHIVE::FORMAT (3) 2003-12-14

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.