ID3 tag for programmers


If you feel unease to do anything in a command line, or you have no idea about what regular expression eyeD3util is a small, yet powerful IMHO, package that handles nasty ID3 tags that GUI may not offer. As the name suggests, it is based upon eyeD3, thanks to Travis’ great work. There are three apps targeting different etches: convert the ill-encoded tag, and convert them to Unicode. Check this for a full story. Though never tested other than Chinese GB2312, theoretically, it can handle the tag encoded in non-latin1 locale. Please leave a comment if you have a success story.

What if no tag attached like Hanes? Well, if we could get the essential information, the track number and name, we may add other meta data using eyeD3. This script parses the filename via the regular expression to get all available meta data you need, for example: "(?P<n>.*) - (?P<t>.*)\.mp3" "02 - 祝我幸福.mp3"
Apply ID3 v2.3 tag to 02 - 祝我幸福.mp3
setTrackNum: ['02', None]
setTitle: 祝我幸福

To be a perfectionist, I would rather check whether the MP3 file includes all essential information required: title, artist, album, track number, year of publish and genre. This script just did the minimum, nothing less, nothing more.

Comments? Feedbacks?