My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads

MMM is a simple Python script that reads music and move them around based on ID3 tags.

Dependencies

MMM requires Python 2.4 (or superior) and Pyvorbis.

Options

  • --version: show program's version number and exit.
  • -h,`--help: show this help message and exit.
  • -s_SOURCE_, --source=_SOURCE-: Source directory. Default is "./".
  • -d_DESTINATION_, --destination=_DESTINATION_: Destination directory. Default is "./".
  • -k, --keep: Keep files on original place (copy instead of move). Default is move (don't keep)
  • `-f_FORMAT_, --format=_FORMAT_: Format to move files. You can use %artist% for the artist name, %album% for the album name, %tracknum% for the track number and %title% for the music title. Default format is %artist%/%album%/%artist%-%tracknum%-%title%.
  • --replace=_REPLACE_: Pairs of chairs to be replaced in the fields. Default is " " (changes spaces to underscores).
  • --remove=_REMOVE_: Chars to be removed from the fields. Default is "/\,.:"'(){}"
  • --no-lower: Don't lower the case of the resulting name. Default isto lower the case.
  • --track-padding=_PADDING_: Padding chars in the track number (%tracknum%). 0 disables any padding. Default is 2.
  • -p, --pretend: Do not move/copy files, just pretend doing it.
  • -o_OUTPUT_ENCODING_, --output-encoding=_OUTPUT_ENCODING_: Encoding used by the system (default is "utf-8")

How to use it

First, make sure your files have the correct tags. Music Brainz offers a small application that tries to find the correct song and download the tags.

When called, mmm will try search for music files on the source directory and above (in other words, recursively) and move them to the destination directory, using the pattern described in the format.

How the format works

The current default format is %artist%/%album%/%artist%-%tracknum%-%title%, which means mmm will try to create a directory for the artist, a directory for the album inside it and then rename the file to the artist, track number and title. If any of the directories doesn't exist, it will be created. The track number is padded for the amount indicated on the option track-padding.

Example: if you have a file named "music.mp3", but the tags says it is Powder by Paul Hertzog, the 11th track on the album Bloodsport, it will be moved to paul_hertzog/bloodsport/paul_hertzog-11-powder.mp3. Also, this is prefixed by the directory pointed on destination, so if you put it as ~/music, the full path will be /home/<your user>/music/paul_hertzog/bloodsport/paul_hertzog-11-powder.mp3.

License

MMM is distributed under the GPL v2.0 or later.

Powered by Google Project Hosting