I know, I've seen it before. It's very limited though.
I think that the ID3 tag support should be provided by a separate module.
My thoughts exactly, though I was thinking of MP3::Info. The idea is to have an --mp3 switch require the module at runtime, then have code that provides the information from the ID3 tag in variables like $ARTIST etc. Afterwards they're checked for changes just like $_ is. Assuming you have names like 02 Falling.mp3 you could then do something like
rename --mp3 '$_="\L\u$ARTIST/\u$ALBUM\E/$_"; $TRACK=0+((/^(\d+)/))
+' -z *
and have it end up in Spicelab/A_day_on_our_planet/02_Falling.mp3 with its ID3 tracknumber set properly.
Adding similar mechanism for EXIF data would be simple (and a good idea too - I didn't think of EXIF, thanks!).
Makeshifts last the longest.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||