[mp3togo] user specified output formatting

Justus Pendleton justus at ryoohki.net
Thu May 18 10:47:40 PDT 2006


Here's a lightly tested small patch that adds a --format option. This 
allows the user more control over the output directory structure. The 
string format is standard python string interpolation:

"%(artist)s/%(album)s/%(tracknumber)s - %(title)s"

Directories are made according to slashes. If you don't have ID3 
installed I wouldn't recommend trying to use this feature. Tags that are 
accessible are:
artist, album, tracknumber, title, genre, year

If --format is present --tree-depth is ignored.

Possible enhancements:
  - more tags
  - support python 2.4's simpler string substitution (PEP 292)
  - handle non-existent tags in a more configurable manner (i.e. if 
"ALBUMARTIST" doesn't exist try "COMPOSER" and then "ARTIST").
-------------- next part --------------
A non-text attachment was scrubbed...
Name: format.diff
Type: text/x-patch
Size: 3355 bytes
Desc: not available
Url : http://puddle.ca/pipermail/mp3togo/attachments/20060518/381e1a2e/format.bin


More information about the mp3togo mailing list