A perfect example of horrible design
The vorbiscomment
command of the Vorbis toolset is one of the most poorly designed pieces of software that I've had the misfortune of using in a long time. The tool can be used to either add a new comment to an ogg file, or entirely replace all comments. It can not be used to update an existing comment. It's a clear violation of "make the common case simple, and the uncommon possible." Updating, or modifying, comments is the one, most common, thing a user might want to do -- and you can't do that with vorbiscomment
.
Here's a use case: you rip a CD, and accidentally enter the wrong DISCNUMBER -- say, 1 instead of 3 -- and you're left with 16 ripped songs all with good metadata, except for the DISCNUMBER. How do you fix this with vorbiscomment
? Well, if the tool was not totally stupid, you'd do something like this:
$ nonstupidvorbiscomment -u -t "DISKNUMBER=3" *.ogg
or, if (for whatever reason) you need to perform a more complex search:
$ find . -regex ".*/Album/.*\.ogg" -exec \
nonstupidvorbiscomment -u -t "DISCNUMBER=3" {} \;
But you can't do that, because vorbiscomment doesn't have a "-u" (update) argument. No, all you get is -w (write) and -a (add). So you end up doing something like this:`
$ find . -regex ".*/Album/.*\.ogg" -exec \
echo vorbiscomment -l \"{}\" \| \
sed \'s/DISCNUMBER=1/DISCNUMBER=3/\' \
vorbiscomment -w -c - \"{}\" \; > runme.sh
$ ./runme.sh
$ rm runme.sh
Yeah, that's slick. Not. Somebody should have reviewed vorbiscomment
before letting it be released.
d.