All Projects → jesseward → discogstagger

jesseward / discogstagger

Licence: MIT license
Console based audio-file metadata tagger that uses the Discogs.com API v2 (JSON based). Relies on the Mutagen and discogs-client libraries. Currently supports FLAC and MP3 file types.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to discogstagger

audio-metadata
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
Stars: ✭ 41 (-36.92%)
Mutual labels:  metadata, mp3, flac
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (+176.92%)
Mutual labels:  metadata, mp3, flac
Music Metadata
Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
Stars: ✭ 455 (+600%)
Mutual labels:  metadata, mp3, flac
Music Metadata Browser
Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
Stars: ✭ 105 (+61.54%)
Mutual labels:  metadata, mp3, flac
audio-tag-analyzer
Extracts metadata music metadata found in audio files
Stars: ✭ 18 (-72.31%)
Mutual labels:  metadata, mp3, flac
Rust Metaflac
A rust library for reading and writing FLAC metadata.
Stars: ✭ 41 (-36.92%)
Mutual labels:  metadata, flac
Ytmdl
A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
Stars: ✭ 2,070 (+3084.62%)
Mutual labels:  metadata, mp3
sox-stream
📣 A stream-friendly wrapper around SoX
Stars: ✭ 50 (-23.08%)
Mutual labels:  mp3, flac
Spotiflyer
Spotify/Gaana/Youtube Music Downloader For Android!
Stars: ✭ 231 (+255.38%)
Mutual labels:  metadata, mp3
Savify
Download Spotify songs to mp3 with full metadata and cover art!
Stars: ✭ 227 (+249.23%)
Mutual labels:  metadata, mp3
dart-tags
ID3 Tag parser written on the pure dart language.
Stars: ✭ 35 (-46.15%)
Mutual labels:  metadata, mp3
Touhou Tagger
从 THBWiki 自动填写东方Project CD曲目信息.
Stars: ✭ 29 (-55.38%)
Mutual labels:  metadata, mp3
sox.js
📢 NodeJS wrapper for the SoX audio tool
Stars: ✭ 18 (-72.31%)
Mutual labels:  mp3, flac
genshin-audio-exporter
Export audio files from Genshin Impact game data into different audio formats.
Stars: ✭ 83 (+27.69%)
Mutual labels:  mp3, flac
aplay-
a simple BitPerfect player
Stars: ✭ 23 (-64.62%)
Mutual labels:  mp3, flac
Youtube-DL-GUI
Graphical User Interace built around youtube-dl CLI
Stars: ✭ 38 (-41.54%)
Mutual labels:  mp3, flac
go-xmp
A native Go SDK for the Extensible Metadata Platform (XMP)
Stars: ✭ 36 (-44.62%)
Mutual labels:  metadata, mp3
Irs
🎸 🎶 A music downloader that understands your metadata needs.
Stars: ✭ 268 (+312.31%)
Mutual labels:  metadata, mp3
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+72.31%)
Mutual labels:  mp3, flac
acxi
acxi is an audio conversion tool that helps sync lossless to lossy formats.
Stars: ✭ 35 (-46.15%)
Mutual labels:  mp3, flac

STATUS

Note that this utility is no longer maintained.

discogstagger

Build Status

What is it

discogstagger is a console based audio meta-data tagger for FLAC, Ogg and MP3 audio files. Album, artist and track data profile is retrieved via the discogs.com API and then saved to the related metadata fields in the audio container.

To tag an album, provide the script with a target directory name (-s), that contains an album consisting of supported media files as well as the discogs.com release-id (-r). discogstagger calls out to the discogs.com API and updates the audio meta-data accordingly.

If no release-id is given the application checks if a file "id.txt" exists (the name of this file can be configured in the configuration) and if this file contains a specific property (id_tag). If both is true the release-id from this file is used. This is useful for batch processing.

During the process, all album images (if present) are retrieved from the API. As well, a play-list (.m3u) and an information file (.nfo) are generated per each release.

Optionally discogstagger will embed the found album art into the file meta data

Requirements

  • Mutagen
  • discogs-client
  • requests
  • Mediafile
  • OAuth

I am also packaging/reusing the MediaFile library from the "beets" project. This will be packaged with discogs tagger until MediaFile is split out to its own package.

Installation

Fetch the repo from github

git clone https://github.com/jesseward/discogstagger.git

Create a virtual environment for your installations

python3 -m venv ~/.virtualenvs/discogstagger
source ~/.virtualenvs/discogstagger/bin/activate

Run the setuptools installation.

python setup.py install

Optionally you can install the developer requirements, if you plan on running the test suite or making changes to the tool

pip install -r dev_requirements.txt

Configuration

DiscogsTagger searches for the configuration file at the default location of ~/.config/discogstagger/discogs_tagger.conf, at run-time. Or you're able to specify the config location with the '-c' switch.

The configuration file must be present to execute the script. The default settings (as shipped), should work without any modifications.

Note that you may wish to modify the following default configuration options. The defaults are shipped as such in attempt to be as non destructive as possible

# True/False : leaves a copy of the original audio files on disk, untouched after 
keep_original=True
# Embed cover art. Include album art from discogs.com in the metadata tags
embed_coverart=False

To specify genre in your tags, review the use_style option. With use_style set to True, you're instructing discogstagger to pull the "Style" field. The style field is typically more genre specific than the discogs "Genre" field. In the example below (40522) with use_style=True, the genre field is tagged as "House".

Use Discogs "style" elements instead of the genre as the genre Meta-Tag in files (True)
Example http://www.discogs.com/Blunted-Dummies-House-For-All/release/40522
Style = House
Genre = Electronic
use_style=True

Furthermore you can use lowercase directory and filenames using the following configuration:

# Use lowercase filenames
use_lower_filenames=True

For batch-mode tagging, it is not necessary anymore to provide the release-id via the '-r' parameter on the commandline. The same is possible by using a file (by default: id.txt) with the key/value pair 'discogs_id'. This can be configured in the configuration via the following parameters as well:

[batch]
# if no release id is given, the application checks if a file with the
# name id_file (in this case id.txt) is in the source directory,
# if it is there the id_tag is checked (discogs_id) and assigned to the
# release id
id_file=id.txt
id_tag=discogs_id

Please note, that right now there is no error-handling, if there is no '-r' parameter and no id.txt file. The program will then just exit with an error message.

The command line takes the following parameters:

$ discogs-tagger --help
Usage: discogs-tagger [OPTIONS]

Options:
  -c, --conf TEXT         The discogstagger configuration file.
  -d, --destination TEXT  The (base) directory to copy the tagged files to
  -r, --releaseid TEXT    The discogs.com release id of the target album
  -s, --source PATH       The directory that you wish to tag
  --help                  Show this message and exit.

Examples

The following tags the directory "Pepe_Bradock-Deep_Burnt" with discogs release id '204' (http://www.discogs.com/release/204)

$ discogs-tagger -s Pepe_Bradock-Deep_Burnt -r 204
2017-07-17 04:36:30,686 discogstagger.main INFO     Attempting to tag files from target destination=Pepe_Bradock-Deep_Burnt
2017-07-17 04:36:31,044 discogstagger.discogsalbum INFO     Fetching discogs release. artist=Pépé Bradock & The Grand Brûlé's Choir, title=Burning, id=204
2017-07-17 04:36:31,047 discogstagger.main INFO     Tagging album 'Pépé Bradock & The Grand Brûlé's Choir - Burning'
2017-07-17 04:36:31,047 discogstagger.main INFO     Creating destination directory 'Pepe_Bradock_and_The_Grand_Brules_Choir-Burning-(KIF_S_A_08)-1999-jW'
2017-07-17 04:36:31,048 discogstagger.main INFO     Downloading and storing images
2017-07-17 04:36:33,966 discogstagger.main INFO     Writing file Pepe_Bradock_and_The_Grand_Brules_Choir-Burning-(KIF_S_A_08)-1999-jW/01-Pepe_Bradock_and_The_Grand_Brules_Choir-Burning_Hot.mp3
2017-07-17 04:36:34,011 discogstagger.main INFO     Writing file Pepe_Bradock_and_The_Grand_Brules_Choir-Burning-(KIF_S_A_08)-1999-jW/02-Pepe_Bradock_and_The_Grand_Brules_Choir-The_Right_Way.mp3
2017-07-17 04:36:34,032 discogstagger.main INFO     Writing file Pepe_Bradock_and_The_Grand_Brules_Choir-Burning-(KIF_S_A_08)-1999-jW/03-Pepe_Bradock_and_The_Grand_Brules_Choir-Deep_Burnt.mp3
2017-07-17 04:36:34,054 discogstagger.main INFO     Generating .nfo file
2017-07-17 04:36:34,056 discogstagger.main INFO     Generating .m3u file
2017-07-17 04:36:34,056 discogstagger.main INFO     Tagging complete.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].