Move My Music 0.3 “Yes dear, I promised not to reinvent the wheel, but…”

Yes, I’ve said several times that I won’t reinvent the wheel, but I had to break my own promise and write my own ID3 parser. So far, it seems to work with ID3 v1.0 and v1.1, v2.2, v2.3 and v2.4 (at least, I had files with those versions and everything worked fine). And that’s the only change in this version.

If you have any file MMM won’t understand, please send it to me to check it, ok?

Download available at MMM homepage.

Sometimes, the wheel must be reinvented

It all began when I decided to put some order on my music directory, as it was a complete mess. So I put the correct tags and wrote a small application to move them around, mmm. And I was happy.

Then, I found some songs with accents, and that broke the filiesystem (ls was showing some pretty strange characters around). So, I did a very small change to change the encoding to utf8, but the user had to specify the original encoding, which wasn’t nice. But the weird characters went away, so I was happy.

Then, pyid3lib decided to broke very hard. I couldn’t move songs around because it was segfaulting, something not nice. I really don’t like using Python bindings: python extensions should be written in python! So, I decided to change the underlying mp3 lib to pytagger, which is a pure python library to read id3 tags. And it also has some nice features, like extracting the encoding from it. So, I could be happy again.

The problem is, pytagger has a lot of misses (sometimes, it can’t find the album title, or the track album, although they are there) and it is currently abandoned.

Right now I have some strange desire to reinvent the wheel and write yet another ID3 extraction library for Python. And also rewrite mmm, as the current encoding problems are driving me nuts.

So, I’m not all that organized after all

Ok, so I’m not all that organized. I did some changes on MMM to support encoding, as I was getting weird stuff on my file system due tags using ISO-8859-1 and the whole system working with UTF-8. Unfortunately, for some reason, the new version didn’t appear in the backup, so the version was completely lost.

Fortunately, as MMM is written in Python, it isn’t hard to do it again.

Scratching an itch is easy; keep scratching after the itch is over is hard

When I wrote MMM, I had a problem: my music collection was badly organized (in a file system point of view) and I thought it would be easy to fix using a tool to do all the fixing automagically. I had all the tools needed to solve my problem and knew how to use them, so there I go. In about one hour I had a tool that solved my problem without adding new ones. But the problem is that I think software should do The Right Thing ™ always, so my plans included support for Ogg files, even if my current music collection didn’t have one.

And, with my problem solved, I don’t have any motivation to keep it going and add ogg support. And now solving the problem isn’t funny anymore; it is going to feel more like a pain doing that than having that warm, funny feeling inside.

Even worst: after writing software for so long, I know that Doing The Right Thing ™ really pays off. I don’t believe that “worst is better” (maybe on Bizarro‘s world) and I’ve proved it to myself, changing everything that I thought was wrong in the project at work to the right thing and giving myself some pats in the back after finish my work before everyone else. So I think that doing the right thing for MMM will pay off later but, right now, it is just annoying the hell of me.

We are not going to see that point oh release…

Ok, I know I promised a 1.0 release of MMM today, but I think I won’t get it.

The problem here is not the OGG parser. Actually, it was reading the Python-Ogg documentation that I found out how to fix almost everything. The problem is that I forgot to read the pyid3lib documentation and test it, and I just found that 1) its design doesn’t fit on my solution (which means that I would have to write a lot more of code — which I’m doing, by the way) and 2) it crashes when I tried to do smart stuff to write less code.

But I’ll get there, I promise; I didn’t gave up yet.

[MMM] Move My Music on Freshmeat

Following an idea by , I did add MMM to Freshmeat. You now can follow its development throught Freshmeat. Sign up and subscribe to the project, so you can get every update.

The project didn’t show up in the front page, but that’s not a problem to me. MMM is too simple to have a big announcement. Pyctoid, in other hand… :)

Anyway, I did read some stuff about PyOgg and PyVorbis and it looks quite simple (not as simple as pyid3lib, but simple anyway) so I intend to add Ogg support tonight. Also, after a little thought, I got some ideas of how to fix most of the problems I left in “TODOs” inside the code. If everything goes fine, tonight we gonna have a 1.0 release.

[MMM] Move My Music 0.1

A friend gave me an idea about renaming music files based on its tags. So I wrote MMM (Move My Music) using id3lib after fixing the tags using the MusicBrainz. You can download version 0.1 here and follow the development here (this page also have a small missing features, that I intend to add in a near future).

And, in case you are wondering, this program is released under the GPL.