#!/usr/bin/perl
use strict;
use Getopt::Long;
use MusicBrainz::Collection;
my $help;
our ($user, $pass, $verbose, $dir);
my $dir = pop @ARGV;
my $ok = GetOptions(
'help|?' => \$help,
'user=s' => \$user,
'pass=s' => \$pass,
'verbose|v' => \$verbose,
);
if ( !$ok || $help || !$dir ) {
require Pod::Usage;
Pod::Usage::pod2usage(1);
}
my $mbcol = MusicBrainz::Collection->new(
user => $user,
pass => $pass,
verbose => $verbose,
);
$mbcol->process($dir);
__END__
=head1 NAME
mbcol - Upload your list of albums to MusicBrainz
=head1 SYNOPSIS
mbcol [OPTIONS] DIRECTORY
This script recursively scans DIRECTORY for all audio files containing
MusicBrainz Album ID tags. The list of albums found is uploaded
to your MusicBrainz account and will appear under "My Collection".
Supported file formats (from L<Audio::Scan>):
MP3, MP4, FLAC, Ogg Vorbis, WMA, WAV, AIFF, Musepack, Monkey's Audio
Options:
--user sampleuser Your MusicBrainz username
--pass 12345 Your MusicBrainz password
-v Display verbose information
MusicBrainz account information may also be stored in the file ~/.musicbrainz
using the format:
user sampleuser
pass 12345
=cut