1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Fixed some parsing logic

This commit is contained in:
Krateng 2018-12-04 19:17:44 +01:00
parent a9b5236612
commit 08c17cab00
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class CleanerAgent:
delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"] #Delimiters used for extra artists, even when in the title field delimiters_feat = ["ft.","ft","feat.","feat","featuring","Ft.","Ft","Feat.","Feat","Featuring"] #Delimiters used for extra artists, even when in the title field
delimiters = ["vs.","vs","&"] #Delimiters in informal artist strings, spaces expected around them delimiters = ["vs.","vs","&"] #Delimiters in informal artist strings, spaces expected around them
delimiters_formal = ["; ",";"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used delimiters_formal = ["; ",";","/"] #Delimiters used specifically to tag multiple artists when only one tag field is available, no spaces used
def parseArtists(self,a): def parseArtists(self,a):

View File

@ -4,11 +4,13 @@ The first column defines the type of the rule:
notanartist Defines strings that can appear behind "feat" in a song title, but denote additional information about the track instead of another artist. notanartist Defines strings that can appear behind "feat" in a song title, but denote additional information about the track instead of another artist.
Second column is the string Second column is the string
belongtogether Defines an artist with an ampersand or other delimiter in their name. Otherwise, the artist string will be interpreted as two different artists (except when there are no spaces). belongtogether Defines an artist with an ampersand or other delimiter in their name. Otherwise, the artist string will be interpreted as two different artists (except when there are no spaces).
This artist will be accepted without further parsing. If you want to replace the spelling, you need a replaceartist entry instead
Second column is the full name of the artist Second column is the full name of the artist
replacetitle Defines an alternative spelling of a track title that should be replaced. replacetitle Defines an alternative spelling of a track title that should be replaced.
Second column is the 'wrong' spelling Second column is the 'wrong' spelling
Third column the correct spelling Third column the correct spelling
replaceartist Defines and alternative spelling of an artist that should be replaced replaceartist Defines and alternative spelling of an artist that should be replaced
Any artist mentioned here will automatically be replaced, there is no need for a separate belongtogether entry
Second column is the 'wrong' spelling Second column is the 'wrong' spelling
Third column the correct spelling. Use ␟ if the spelling should correct to several artists Third column the correct spelling. Use ␟ if the spelling should correct to several artists
countas Defines an artist that should be counted together with another artist for chart statistics etc. countas Defines an artist that should be counted together with another artist for chart statistics etc.
@ -23,7 +25,9 @@ An example file could look like this:
notanartist In Dreams notanartist In Dreams
belongtogether Darth & Vader belongtogether Darth & Vader
belongtogether AC/DC # / and ; separate even when there are no spaces, so make sure to add artists with those symbols
replacetitle 첫 사랑니 (Rum Pum Pum Pum) Rum Pum Pum Pum replacetitle 첫 사랑니 (Rum Pum Pum Pum) Rum Pum Pum Pum
replaceartist Dal Shabet Dal★Shabet replaceartist Dal Shabet Dal★Shabet
replaceartist Stephen Rippy/Kevin McMullan Stephen Rippy␟Kevin McMullan replaceartist Mr FijiWiji, AgNO3 Mr FijiWiji␟AgNO3 # one artist is replaced by two artists
replaceartist Selena Gomez & the Scene Selena Gomez & The Scene # note how there is a &, but we do not need an extra belongtogether entry.
countas Trouble Maker HyunA countas Trouble Maker HyunA