marcderbauer / songcrawler

Crawl Spotify and Genius for all the songs of your favourite artist!
MIT License
0 stars 0 forks source link

.csv #10

Closed marcderbauer closed 2 years ago

marcderbauer commented 2 years ago

Add saving .csv the outcome as a .csv file. Will still need to think this through, but probably want each row to be a song and each column as one of the song attributes.

Open Questions

Created via Raycast

marcderbauer commented 2 years ago

Should be the same as when saving .json files. Same folder structure, same way files are saved:

marcderbauer commented 2 years ago

Could maybe make part where it checks for a folder and creates one if necessary into a method. Maybe as part of the Music class

marcderbauer commented 2 years ago

Implemented this as a classmethod for now. Would be cool to have it as a regular (object) method, but not possible without changing nomenclature.

self.name currently refers to different things depending on if it's an album or a song... Would need to turn it into something like self.songname, self.albumname, self.artistname, self.playlistname,...

marcderbauer commented 2 years ago

Changed self.name to be more consistent (now self.song_name, self.album_name,...) Save song is correctly implemented as well now and can overwrite existing songs if necessary. This works both for .csv and for .json.

Added methods for reading albums from .csv and .json

Added ASCII headers to find things easier

Multipool error handling (quite simple for now, just writes to a file once, but errors aren't that frequent anyway).

--overwrite works for songs, still needs to be checked for albums and artists.

Genius album functionality removed. Artists having different songs with the same name is too much of an edge case to support.