Skip to main content

Tagtool allows you to perform mass ID3 tag cleaning operations.

Project description

Mass clean metadata of downloaded MP3 songs.

I wrote the initial version as a simple script that just worked. This tool later became an exercise in command line application design as I’d never done it before. It uses docopt (along with some hackery to allow sub-commands)


pip install tagtool

You could also use `pipsi <>`__ to install.


    tagtool [--no-skip] <command> [<args>...]

    replace     Perform regex replace on tags
    remove      Remove tag frames
    rename      Rename files to format: "%TrackTitle%.mp3"
    help        Read about a specific command

    --no-skip   Do not skip already tagged files



Perform regex replace on tags like artist name, track title etc.

    tagtool replace --pattern=<pattern> [--repl=<replacement>] <file>...
                    [--prune] [--frames=<tags>] [--frames_skip=<tags>]

    <file>                       MP3 file(s) to process
    --pattern=<pattern>          Pattern to search for
    --repl=<replacement>         Replacement text
    --prune                      Remove empty frames
    --frames=<frames>            Comma separated list of frames to
                                 restrict replacement to
    --frames_skip=<frames>       Comma separated list of frames to skip

    tagtool replace --pattern='\s+\d+\s+' --repl='' --prune SomeSong.mp3 --frames_skip=TOPE,TIT2


Remove tag frames.

    tagtool remove  --frames=<tags> <file>...

    <file>                       MP3 file(s) to process
    --frames=<frames>            Comma separated list of frames to remove
    --prefix                     Consider the list of frames as prefixes

    tagtool remove --frames=APIC,COMM,USLT *.mp3


Rename a file with it's track title.

    tagtool rename <file>...

    <file>                       MP3 file(s) to process

    tagtool rename *.mp3


Tagfix is a script that uses the available tagtool commands as building blocks and performs multiple cleaning operation on files in one pass. If you download music from sites like songspk, djmaza etc. then this script is for you. It removes all mention of these websites from the tags.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tagtool-1.0.7.tar.gz (4.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page