Skip to content

Instantly share code, notes, and snippets.

@dergachev
Last active December 27, 2015 19:49
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dergachev/7379645 to your computer and use it in GitHub Desktop.
Save dergachev/7379645 to your computer and use it in GitHub Desktop.
Go here to export playlists: http://groovebackup.com/
Each playlist will look like this:
```
"SongName","ArtistName","AlbumName"
"Oxford Comma","Vampire Weekend","Vampire Weekend"
"Le Vent Nous Portera","Noir Désir","Radio Bemba Sound System"
"Na neh na","Vaya Con Dios","Top 2000"
"Discordance","Paris Combo","Motifs"
"Indie Rock N Roll","The Killers","Hot Fuss"
"Tassez-vous de d'là","Les Colocs","Dehors novembre"
"J't'emmène au vent","Louise Attaque","Louise attaque"
"En berne","Les Cowboys Fringants","Break syndical"
```
Then install csvkit if you don't already have it:
```
easy_install install pip
pip install csvkit
```
Then use it to rewrite the csv:
```
cat playlist.csv | csvkit -c 2,1
```
Then paste that to http://www.ivyishere.org/ivy/ (there's a tab for pasting)
This will produce the following:
```
spotify:track:2Ml0l8YWJLQhPrRDLpQaDM
spotify:track:6APJjwrtVrFllc5wFD9Tg6
spotify:track:6QQy4g2eBwjMtnuR4b1HCs
spotify:track:5WEjx5F0yN1Qy85mIzHMom
spotify:track:15rn9UNrC8bx2sTXCJQYc0
```
This can be pasted into spotify playlist, in the desktop app.
Adapted from http://community.spotify.com/t5/Help-Accounts-and-Subscriptions/Import-Grooveshark-playlists/m-p/452358/highlight/true#M57419
@ccdunder
Copy link

s/csvkit/csvcut/

@weiweihuanghuang
Copy link

thanks for this. took me a while to realise
cat playlist.csv | csvkit -c 2,1
should've been
cat playlist.csv | s/csvkit/csvcut -c 2,1

@kakyoism
Copy link

On Mac (installed csvkit), running
cat playlist.csv | s/csvkit/csvcut -c 2,1

I got:

$ cat playlist.csv | s/csvkit/csvcut -c 2,1
-bash: s/csvkit/csvcut: No such file or directory

@avidas
Copy link

avidas commented May 18, 2015

Try cat playlist.csv | /usr/local/bin/csvcut -c 2,1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment