Spotify Import CLI
This app is intended to help with importing tracks exported to CSV from Apple Music and other websites into Spotify liked list using Spotify API.
Usage
Build:
npm run build
Run help:
./dist/spotify-import --help
First of all, you will need to grab spotify API token and export it in command line so this application will be able to talk with Spotify:
- Login to Spotify in browser
- Open browser developer console (CMD+Shift+I on mac)
- Paste script from
userscripts/spotify-dump-token.js
- It should show a message with your token, copy it to clipboard
- Paste on command line:
export SPOTIFY_TOKEN="<paste_your_token>
- Now you can run
spotify-import
Keep in mind, Spotify token is usually valid for 45 mins only. When it expires, you need to obtain a new token again.
Export from different resources
Export from Apple Music
- Open Apple Music
- Open Library/Songs
- Select all (CMD+A)
- Open Excel
- Paste
- Save as CSV for example as
apple-music.csv
Export from vk.com
- Login to vk.com
- Click music
- Click "show all"
- Scroll list from top to bottom to preload whole list
- Open browser developer console (CMD+Shift+I on mac)
- Paste script from
userscripts/vk-music-export-list.js
- File with list of track should be exported as
vk-music.csv
Export from Spotify
- Login to spotify.com
- Open browser developer console (CMD+Shift+I on mac)
- Paste script from
userscripts/spotify-export-liked-list.js
- File with list of track should be exported as
spotify-music.json
Export folder files
{
printf "performer\ttitle\n"
find ~/Documents/music/vk.com -type file -iname "*.mp3" \
| sed -e 's/\.mp3//' -e 's!^.*/!!' -e 's!–!-!g' -e 's! - !\t!'
} > folder.tsv