The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Astroboy::AlbumFile

SYNOPSIS

   use Astroboy::AlbumFile;

   my $m =  Astroboy::AlbumFile->new('~/music/file.mp3');
   
   my $organized_path = $m->refile 
      or die($m->errstr);

   print "moved to $organized_path\n";

DESCRIPTION

Private.

METHODS

new()

Argument is path to file. Returns undef if not file.

is_mp3()

Boolean.

title() track() artist() album() comment() year() genre()

If this is an mp3, attempts to seek these id3tags.

rel_loc_suggested()

Setget. Returns path like artist/album.

filename()

filename_suggested()

Tries to determine what the filename should be.

rel_path_suggested()

abs_path_suggested()

abs_path_suggested_exists()

abs_music()

Abs path to music archive. Defaults to $ENV{HOME}/music. Please note this is a package variable, so it affects all Astroboy objects.

METHODS PRIVATE

f()

Returns File::PathInfo object.

t()

Returns MP3::Tag object.

CAVEATS

This package is in development. Do not use the api, use the cli. Use the command line interface scripts for stability.

SEE ALSO

Astroboy

AUTHOR

Leo Charre leocharre at cpan dot org

COPYRIGHT

Copyright (c) 2008 Leo Charre. All rights reserved.

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.