Usage
To import the playlist into Spotify:
- Copy the output of the generator: Choose Edit -> Copy [Ctrl + C].
- Create a new playlist in Spotify: Choose File -> New Playlist [Ctrl + N].
- Paste into the playlist: Select the playlist and choose Edit -> Paste [Ctrl + V].
Top tracks
To retrieve the top 10 tracks of an artist, pass the following to the generator:
#top Aphex TwinThe 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 HouseThis 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 #top5.
Similar artists
To find similar artists:
#similar Aphex TwinThis 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 #similar10.
Albums
To add an album:
#album Substrata - BiosphereArtists
To add all the albums of an artist:
#artist Beach HouseTracks
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 HouseDuplicates
By default, the generator automatically removes duplicate tracks. To allow duplicates, add the line:
#duplicatesOrder
To order the tracks by Spotify popularity, use #order by:
#order by popularity #artist Beach HouseThe generator also provides Last.fm support. To order by Last.fm playcount, add the line #order by lastfm:
#order by lastfm #artist Beach HouseTo order by Last.fm user playcount, add the Last.fm username at the end:
Group
To sort the ordered tracks into groups, use #group by:
#order by lastfm #group by artist #similar Beach HouseThis will create a Last.fm-ordered playlist of artists similar to Beach House, where tracks from the same artists are grouped together.
Alternate
To group the tracks and then interleave them, use #alternate by:
#order by popularity #alternate by artist #similar Beach House #similar HooverphonicThis 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.
Supported formats
The generator can work with Spotify URIs, Spotify links, M3U playlists and CSV files. By default, the generator outputs a list of Spotify URIs.
Import existing Spotify playlists
One can easily work with existing Spotify playlists. By selecting the playlists tracks in Spotify, copying them and then pasting them as text somewhere else, one obtains a list of Spotify links:
//open.spotify.com/track/4oNXgGnumnu5oIXXyP8StH //open.spotify.com/track/7rAjeWkQM6cLqbPjZtXxl2 //open.spotify.com/track/2Nt4Uw91pQLXSJ28SttDdF ...One can easily apply #order by popularity to such a list:
#order by popularity //open.spotify.com/track/4oNXgGnumnu5oIXXyP8StH //open.spotify.com/track/7rAjeWkQM6cLqbPjZtXxl2 //open.spotify.com/track/2Nt4Uw91pQLXSJ28SttDdF ...Likewise, spotify URIs are handled as well:
M3U playlists
One can also import M3U playlists [with the file extension .m3u or .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.mp3The generator translates this to:
Desire Lines - Deerhunter Saved By Old Times - Deerhunter Agoraphobia - Deerhunter Revival - Deerhunter Twilight at Carbon Lake - DeerhunterComma-separated values
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:
#csv Desire Lines - Deerhunter Saved By Old Times - Deerhunter Agoraphobia - Deerhunter Revival - Deerhunter Twilight at Carbon Lake - DeerhunterCSV 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].
Command-line script
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 //github.com/epsil/spotgen.gitAlternatively, download a ZIP file.
Run the script with ./index.js or node index:
$ ./index.js input.txt output.txt