@@ -0,0 +1,1986 @@
+%22%22%22 Some dumbshit to import (or try to anyway) Google Play Music playists (courtesty of TakeOut data)%0Ato Spotify. Lord knows YouTube music is a raging trashfire :/%0A%0ACopyright (c) %3C2020%3E %3Cgeudrik%3E%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation the rights%0Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0Acopies of the Software, and to permit persons to whom the Software is%0Afurnished to do so, subject to the following conditions:%0A%0AThe above copyright notice and this permission notice shall be included in all%0Acopies or substantial portions of the Software.%0A%0ATHE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0AAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0ALIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0AOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0ASOFTWARE.%0A%22%22%22%0A%0Aimport os%0A%0Aclass Track:%0A%09%22%22%22 Represents a single track %0A%09Args:%0A%09%09filepath (str) Absolute filepath of the Track.csv file%0A%0A%09Return:%0A%09%09Dict representation of the track%0A%09%22%22%22%0A%0A%09def __init__(self, filepath):%0A%09%09self._filepath = filepath%0A%0A%09%09with open(self._filepath, 'r') as csvfile:%0A%09%09%09row = None%0A%09%09%09reader = csv.DictReader(csvfile)%0A%09%09%09for _row in reader:%0A%09%09%09%09row = _row%0A%09%09%09%09break%0A%0A%09%09self.title = row%5B'Title'%5D%0A%09%09self.artist = row%5B'Artist'%5D%0A%09%09self.album = row%5B'Album'%5D%0A%0A%0Aclass Playlist:%0A%09%22%22%22 Represents a collection of tracks%0A%09%22%22%22%0A%0A%09%0A%0Afor root, dirs, files in os.walk(sys.argv%5B1%5D):%0A%09for d in dirs:%0A%0A%09%09# Load playlist name up%0A%09%09with open(os.path.join(os.path.abspath(root), d, 'Metadata.csv'), 'r') as csvfile:%0A%09%09%09reader = csv.reader(csvfile)%0A%09%09%09fields = reader.next()%0A%0A

Create google_music_to_spotify_importer.py