I'm working on a music database.
I want the user to define a mask to show the program how his folder structure is laid out for importing the music into the db. I don't want to work primarily with mp3tags or similar stuff, because they might not be all complete, resulting in a lot of orphaned tracks.
So for example the mask may say:
<artist>\<year> - <album>\<track_no> - <title>.<extension>
and the path says:
Springsteen, Bruce\1984 - Born In The U.S.A\01 - Born In The U.S.A..mp3
Which should result in a dict like
{"artist": "Springsteen, Bruce", "year": "1984", "album": "Born In The U.S.A.", "track_no": "01", "title": "Born In The U.S.A.", "extension": "mp3"}
Inserting the mask parts as keys is already done. Splitting the path by the backslashes is no problem, but the other delimiters could be whatever and even different delimiters in one folder name, e.g.
<year>. <artists> - <album>\<track_no> - <title>.<extension>
and so on.
I'm stumped and previous searches where not helpful
Thanks