A module that removes common unnecessary words from album and song tags, such as 'remastered', 'deluxe edition', etc.
npm install album-cleantagThis can be used to help make Last.fm scrobbling and library management more organized.
The "red flags" it searches for include: 'anniversary', 'bonus', 'deluxe', 'edition', 'expanded', 'explicit', 'reissue', 'remaster', 'version'. If a suffix contains one or more of these, the entire suffix is deleted.
For example, if you give it Swans - Filth (Deluxe Version), it will return Swans - Filth.
npm i album-cleantag
`
`
const cleantag = require('album-cleantag');let albumName = 'Godflesh - Post Self (Remastered)';
albumName = cleantag.clean(albumName);
console.log(albumName); // Godflesh - Post Self
`$3
Python users can download the cleantag.py file and use it in your code:
`
import cleantagprint(cleantag.clean('Yeezus (Explicit Version)')) # Yeezus
`$3
The options object can be passed to the second parameter. It can contain the following parameters:
`
const options = {
addRedFlags: // add red flags to the list
excludeRedFlags: // remove red flags from the list
customRedFlags: // replace my red flags with your own list (don't use with the other two options)
}cleantag.clean(albumName, options);
``