#!/usr/bin/perl
#Philip Fibiger
#pnf1@cornell.edu

use strict;
use vars qw($VERSION);

use MP3::Info;
use Getopt::Std;
use File::Find;

my $directory;
my @mp3s;
my %opts;


sub wanted {
  if (/\.mp3/i) {
		push @mp3s, $File::Find::name;
	}
}
getopts('d:', \%opts);

if (!(%opts)) {
print "usage: mp3tag -d <directory name>"
#maybe someday this'll get fancy, and look up songs via freedb and
#set their id3 information.
}
else {
	$directory = $opts{'d'};

	find ({wanted => \&wanted, no_chdir=>1}, $directory);

	foreach my $mp3name (@mp3s) {
	  remove_mp3tag ($mp3name, 'ALL');
	}
}