Skip to content

Tag audio files with Beatport ID easily using fuzzy matching

License

Notifications You must be signed in to change notification settings

KeelDev/beatport_tracktagger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beatport Tracktagger

Build Status

Ever bought tracks from beatport that didn't have tags in it? Or you simply wanted to tag files automatically, by scraping?

This multithread tagging tool uses fuzzy string matching to do the work. It's capable of getting useful tags from beatport (-s) and assigning them into audio file (-t). You can overwrite existing tags in file (-f).

Even though it's able to tag files only using title and artist in attributes (-z), tagger works best with beatport id in front of the filename e.g. 5024319_track.mp3 (that's format from bought beatport tracks).

Fuzzy matching uses probabilities, instead of exact 'yes' or 'no' matching. It can return false match, when info is not accurate enough or when beatport doesn't know about the release yet. I noticed that Beatport sometimes change the id of tracks.

Dependency: newest Python 3

Installation

# install dependencies
pip3 install lxml urllib3 mutagen fuzzywuzzy

# clone this project
git clone https://github.com/cromize/beatport_tracktagger.git

# run
./tracktagger.py -t -s -a -i some/path

Usage

# it runs from working directory, when no path is supplied

# get tags from beatport into local db, doesn't update actual files
./tracktagger.py -s

# tag files with tags from local db
./tracktagger.py -t

# save artwork from beatport (500x500)
./tracktagger.py -a

# clean all tags and artwork
./tracktagger.py -c

# run recursively
./tracktagger.py -r

# scrape info from file and match using fuzzy matching
./tracktagger.py -z

# force tag overwrite
./tracktagger.py -ft

# get tags and artwork from beatport and update local files
./tracktagger.py -t -s -a

# run from supplied path with all possible options (including sub-folders)
./tracktagger.py -tsari some/path

Supported formats

  • FLAC
  • MP3

Libraries Used

  • urllib3 for pulling webpage
  • lxml for parsing info
  • mutagen for assigning tags to files
  • fuzzywuzzy for fuzzy string matching

About

Tag audio files with Beatport ID easily using fuzzy matching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.1%
  • Shell 6.9%