To import the playlist into Spotify:
To retrieve the top 10 tracks of an artist, pass the following to the generator:
#top Aphex Twin
The generator will output a playlist consisting of the ten most popular tracks of Aphex Twin, which can then be imported into Spotify.
All of the directives listed here can be used multiple times. For example:
#top Aphex Twin #top Beach House
This will create a playlist consisting of the top tracks of Aphex Twin, followed by the top tracks of Beach House.
To retrieve only the top 5 tracks, use
To find similar artists:
#similar Aphex Twin
This will generate a 100-track playlist consisting of the 5 most popular tracks from the 20 most similar artists to Aphex Twin.
To retrieve more tracks, use
To add an album:
#album Substrata - Biosphere
To add all the albums of an artist:
#artist Beach House
To add a single track to the playlist, add a line on the form
TITLE - ARTIST:
Walk in the Park - Beach House Irene - Beach House Other People - Beach House Troublemaker - Beach House Wishes - Beach House
By default, the generator automatically removes duplicate tracks. To allow duplicates, add the line:
To order the tracks by Spotify popularity, use
#order by popularity #artist Beach House
The generator also provides Last.fm support. To order by Last.fm playcount, add the line
#order by lastfm:
#order by lastfm #artist Beach House
To order by Last.fm user playcount, add the Last.fm username at the end:
#order by lastfm username #artist Beach House
To sort the ordered tracks into groups, use
#order by lastfm #group by artist #similar Beach House
This will create a Last.fm-ordered playlist of artists similar to Beach House, where tracks from the same artists are grouped together.
To group the tracks and then interleave them, use
#order by popularity #alternate by artist #similar Beach House #similar Hooverphonic
This will create a Last.fm-ordered playlist of artists similar to Beach House and Hooverphonic, with each track having a different artist from the previous track.
The generator can work with Spotify URIs, Spotify links, M3U playlists and CSV files. By default, the generator outputs a list of Spotify URIs.
One can easily work with existing Spotify playlists. By selecting the playlist’s tracks in Spotify, copying them and then pasting them as text somewhere else, one obtains a list of Spotify links:
https://open.spotify.com/track/4oNXgGnumnu5oIXXyP8StH https://open.spotify.com/track/7rAjeWkQM6cLqbPjZtXxl2 https://open.spotify.com/track/2Nt4Uw91pQLXSJ28SttDdF ...
One can easily apply
#order by popularity to such a list:
#order by popularity https://open.spotify.com/track/4oNXgGnumnu5oIXXyP8StH https://open.spotify.com/track/7rAjeWkQM6cLqbPjZtXxl2 https://open.spotify.com/track/2Nt4Uw91pQLXSJ28SttDdF ...
Likewise, spotify URIs are handled as well:
#order by popularity #alternate by album spotify:track:4oNXgGnumnu5oIXXyP8StH spotify:track:7rAjeWkQM6cLqbPjZtXxl2 spotify:track:2Nt4Uw91pQLXSJ28SttDdF ...
One can also import M3U playlists (with the file extension
.m3u8), provided they contain
EXTM3U metadata. That is, the playlist should be on the form:
#EXTM3U #EXTINF:404,Desire Lines - Deerhunter Deerhunter/Halcyon Digest/06 Desire Lines.mp3 #EXTINF:230,Saved By Old Times - Deerhunter Deerhunter/Microcastle/10 Saved By Old Times.mp3 #EXTINF:202,Agoraphobia - Deerhunter Deerhunter/Microcastle/02 Agoraphobia.mp3 #EXTINF:133,Revival - Deerhunter Deerhunter/Halcyon Digest/03 Revival.mp3 #EXTINF:264,Twilight at Carbon Lake - Deerhunter Deerhunter/Microcastle/12 Twilight at Carbon Lake.mp3
The generator translates this to:
Desire Lines - Deerhunter Saved By Old Times - Deerhunter Agoraphobia - Deerhunter Revival - Deerhunter Twilight at Carbon Lake - Deerhunter
The generator can read and write the CSV format used by Exportify:
spotify:track:3jZ0GKAZiDMya0dZPrw8zq,Desire Lines,Deerhunter,Halcyon Digest,1,6,404413,, spotify:track:20DDHYR4vZqDwHyNFLwkXI,Saved By Old Times,Deerhunter,Microcastle,1,10,230226,, spotify:track:2SpHd4lGMrJMIQDf92V6VP,Agoraphobia,Deerhunter,Microcastle,1,2,202640,, spotify:track:30wvVTkqA4Fp5ZCG0xGof7,Revival,Deerhunter,Halcyon Digest,1,3,133666,, spotify:track:6vtwbm7YGkTwTINdrcXV5I,Twilight At Carbon Lake,Deerhunter,Microcastle,1,12,263986,,
To output to this format, add the line
#csv Desire Lines - Deerhunter Saved By Old Times - Deerhunter Agoraphobia - Deerhunter Revival - Deerhunter Twilight at Carbon Lake - Deerhunter
CSV files have the advantage of being editable with a spreadsheet editor such as Microsoft Excel or LibreOffice Calc. They are also future-proof, as they contain additional info to the Spotify URIs (which might change).
A command-line version is also available. It requires Node to be installed.
The source code is located at GitHub. To clone the repository:
$ git clone https://github.com/epsil/spotgen.git
Alternatively, download a ZIP file.
Run the script with
$ ./index.js input.txt output.txt