How's your programming skills? Since you're playing on Linux, and asking for shell script-y type things, I'll suggest looking at perl, particularly the File::Find module (to recurse through your directories), and the MP3::Tag* modules (you could probably just install the MP3 bundle from CPAN). I wrote my own custom rip/encode/tag script with them, and they're pretty easy to use. With them, 1, 2, 3 and 5 become trivial:


use MP3::Tag::ID3v1;
use MP3::Tag::ID3v2;
my $mp3 = MP3::Tag->new($filename);
$mp3->get_tags();
if (exists $mp3->{ID3v2}) {
# Put it in the database. There's mySQL modules
# available on CPAN, as well.
}
elsif (exists $mp3->{ID3v1}) {
# Convert tag to id3v2. Left as exercise for the
# reader. perldoc MP3::Tag::ID3v2
}
else {
print "$filename : No ID3 tags found.\n";
# Create id3v2 tag from $filename
}


The id3v2 tag spec is pretty simple -- you're just looking at TPE1 (artist), TALB (album), TIT2 (trackname), TRCK (track number), TCON (genre), TYER (year) and COMM (comment) at most. Except for the last three, everything you need in your id3v2 tag is encoded in your filename.

Sorry I can't give any suggestions on the sql -- I'm so far lucky enough to remain blissfully unaware of databases.

Cheers,


Edited by canuckInLA (04/04/2002 13:22)