package MP3::CreateInlayCard; our $VERSION = '0.06'; # $Id: CreateInlayCard.pm 535 2009-02-13 23:26:32Z davidp $ use strict; use warnings; use File::Find::Rule; use Music::Tag; use Cwd; use HTML::Template; =head1 NAME MP3::CreateInlayCard - create a CD inlay label for a directory of MP3 files =head1 SYNOPSIS use MP3::CreateInlayCard; print MP3::CreateInlayCard::create_inlay( {dir => $dir, template => $template}); # $dir is the directory containing the MP3 files. If not specified, we'll # use the current directory. # $template is the filename of a template which HTML::Template should # read and populate. Alternatively, it can be a scalar reference, in which # case it will be taken to be the template contents to use. If it's not # supplied, a simple default built-in template will be used. # If you can't be bothered to write a script to call this module, use # 'makeinlay.pl' distributed with this package, or just do: perl -MMP3::CreateInlayCard -e \ "print MP3::CreateInlayCard(create_inlay({ (see example above) });" # If you're in the directory containing the MP3's, and you want to use the # built-in default template, just supply an empty hashref: perl -MMP3::CreateInlayCard \ -e "print MP3::CreateInlayCard(create_inlay({});" # or, more easily, use the eg/createinlay.pl script supplied with this # module. (Perhaps copy it to somewhere in your path and rename it to # 'createinlay', so you can just change directory into the appropriate # place and type 'createinlay'). =head1 DESCRIPTION Reads a directory of MP3s, and produces a HTML file you can print for a nice "inlay" for a CD case. Useful if you're burning a directory full of MP3s to a CD, and want an inlay label created for you. =cut =head1 FUNCTIONS =over 4 =item create_inlay Go through the specified directory and produce the inlay. Takes a hashref of: =over 4 =item I The directory containing the MP3 files =item I