


I've added a split_value function that splits key defititions for COMM, TXXX, and POPM frames on non-escaped colons only, replaces double backslashes with single ones (so that \ or even \: can be written into tags), and removes any other backslashes. See the attached diff for a draft implementation. A couple of regular expressions will do, I think. I don't think we need a full-blown parser for our simple unescaping. I would prefer the "-e" switch to turn it on and default to the old > possibly breaking existing stuff, that backslashes need to be doubled > (a) escaped colons are supported now and (b) less obviously and > here, a note should be added to the release notes and/or man page that > If you decide to go for a escaping mechanism like the one proposed Python's string_escape codec should make this easy: > Just solving the colon problem is good enough for me. Maybe a "big" escaping mechanism would carry things too far. I'm not sure if newlines are even allowed in We'd need a mapping table for those and/or > So far there are no provisions for common escape sequences like \n for Why not? The regexp doesn't handle all cases and is imho harder to > couple of regular expressions will do, I think. > I don't think we need a full-blown parser for our simple unescaping. Most of my changes are built after the -verbose option.
#QUOD LIBET VS FOOBAR CODE#
I know very little python, so my code is certainly far from perfect.
#QUOD LIBET VS FOOBAR PATCH#
My tentative patch shows how mid3v2 (and its documentation) might be adapted for a new -delimiter option. Backward compatibility with id3v2 would be preserved.

There's no risk of breaking existing skripts with the added option. The colon would remain the default delimiter. Mid3v2 -delimiter=# -TXXX "QuodLibet::albumartist#The Examples" track.mp3 A better idea, in my view, is to allow users to specify their own delimiters from the command line as needed, like this: My first thought was to add some special handling for QuodLibet:: prefixes and/or double colons. The reason, of course, are the double quotes in the prefix as used by Quod Libet (and Ex Falso), since they conflict with the delimiter colon in the description key for TXXX (as well as COMM and POMP) frames. Mid3v2 -TXXX "QuodLibet::albumartist:The Examples" track.mp3 A command like the following just won't work as intended: There's just one limitation that I find a little irksome. I use mid3v2 as a tool for skripted tagging of my music collection for Quod Libet, and I'm quite happy with it.
