Code Monkey home page Code Monkey logo

autotagger's Introduction

Autotagger

Tag .mp3 and .m4a audio files from iTunes data automatically.

There are various standards in audio file tagging, and the fields they contain are huge mess, but since most of them are not being used by us normal people, to make things simpler, I chose 8 essential and common fields pragmatically:

  • Title
  • Album
  • Artist
  • Album Artist
  • Genre
  • Release Date
  • Track Number
  • Disc Number

By default, autotagger will only work with these 8 fields, anything not included will be ignored.

autotagger is currently tested under Mac OS X with Python 2.7.10, if you find anything wrong with this program, feel free to submit an issue.

TODO:

  • [ ] append album artwork in tracks

Installation

pip install autotagger

Usage

autotagger combines audio files with iTunes data, it uses track number (and disc number, if exists) to identify a song and match it with iTunes data. In short, the progress could be summarized in three steps:

  • Find the url of your album on iTunes, for example.
  • Make sure every song you want to tag has track number (and disc number, if its a multi-CD album) set properly. You can use a ID3 tagging tool like meta on OS X or mp3tag on Windows to achieve that.
  • Run autotagger command with data above.

autotagger --help to see detailed information about command line options.

Input/Paste songs manually

Use -u to indicate the iTunes album url:

autotagger -u https://itunes.apple.com/us/album/schole-compilation-vol.-1/id251480659

After running this command, autotagger will ask you to enter the file paths, you can copy them by right click on songs in finder and choose Copy Path

image

Then paste them in the terminal, and hit enter to continue.

You can also album id instead of url to make it clearer:

autotagger -i 251480659

Pass songs from pipeline

If you can get the song names from other command's output, you can use pipeline mode to feed the input, add -p option to enable this feature:

find album -type f -name '*.mp3' | autotagger -i 251480659 -p

Clear other tags

If you want the songs to be tagged just the 8 fields other than anything else, add -c to enable that. By adding this option, only the 8 fields will be contained in the processed songs, any other fields will be removed.

autotagger -i 251480659 -c

Download artwork

Add -a option to download artwork, note this option will make the command stop tagging songs.

autotagger -i 251480659 -a

Screenshots

autotagger -i 251480659

image

find album -type f -name '*.mp3' | autotagger -i 251480659 -p

image

autotagger's People

Contributors

reorx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autotagger's Issues

Will misidentify similarly named albums

This code for the most part works great.

However, when there are multiple volumes of an album, it will often choose the newest one, rather than the one closest to the name. (ie. volume II instead of volume I)

[Feature Request] Any plans to support FLAC

Your work is great! Really appreciated! But just like the title said, are there any plans to add support for a variety of formats such as the popular FLAC and APE because those formats dominated lossless audio world.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.