Dear fellow monks,

Just wanted to share an experience of how Perl made life easier (again !).
I like to organize my MP3's by giving them file names of the form "Author - Song".mp3... for some reason I despise MP3's ID3 tags.
Since a newer version of Winamp came in, it made up ID3v2 for all songs, and in winamp's playlist screen I see "no artist - no title" for all, and that's annoying. Changing thousands of MP3's manually is not fun enough to even start doing it, so I was mad for some time.

Today I finally decided to get it over with !
My MP3's are on the Win2k workstation, no Perl there (it's on the AIXes/Linuxes)... No problem, download Cygwin's Perl 5.8 port. Works great... OK, going to search.cpan.org, MP3::Tag seems suitable... Installing... Hmm, it's pretty complicated... Tinkering with the examples for a few minutes... Viola !
Another 15 minutes, and I had the following script that removes all ID3 tags from a given list of MP3's,
use MP3::Tag; foreach $filename (@ARGV) { print "$filename\n"; $mp3 = MP3::Tag->new($filename); # read an existing tag $mp3->get_tags(); if (exists $mp3->{ID3v2}) { $id3v2 = $mp3->{ID3v2}; $id3v2->remove_tag(); } if (exists $mp3->{ID3v1}) { $id3v1 = $mp3->{ID3v1}; $id3v1->remove_tag(); } }
and in another 5 minutes I have a nice, correct, Winamp playlist.

In reply to Using Perl to organize my MP3's by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.