A playlist generator for creating local playlists using Spotify curated playlists
Project description
Spotipylist
A playlist generator for creating local playlists using Spotify's curated playlists
Table of Contents
General Info
This project is my final project for CS50x (Harvard University's Intro to Computer Science hosted on edX.org)
The main purpose is to make creating playlists from my personal music library faster, easier, and better by using the track lists of many of the fantastic playlists that are already hosted on Spotify.
Video Demo: https://youtu.be/hiCw-1UxLPs
Dependencies
Spotipylist uses the following:
- Python 3.6 or later
- spotipy 2.19.0
- rapidfuzz 1.7.1
Setup
Spotipylist is installable using pip
:
pip install spotipylist
OR
python3 -m pip install spotipylist
Currently, your music library must be arranged the in the following format:
-
Folder structure:
<music_library>/<artist>/[<album>/]
-
Filenames
<track_number> - <track_name>.mp3
where track_number is 2 digits (e.g. 01 for track number 1)
This is mostly a personal choice as that's how my music library is structured. I have considered other options, such as adding support for ID3 tags, and probably will add one or more in future releases.
Usage
-
Set the following environment variables:
- SPOTIPY_CLIENT_ID
- SPOTIPY_CLIENT_SECRET
- SPOTIPYLIST_MUSIC_LIBRARY
To set SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET, first create a new app on https://developers.spotify.com, then use the client_id and client_secret given there.
Set SPOTIPYLIST_MUSIC_LIBRARY with the absolute path to your local music library.
-
Because you installed from PyPi, you can run spotipylist in your terminal with
spotipylist
-
You will be prompted for the Spotify playlist ID you want to copy.
- The playlist ID is the last portion of a Spotify Playlist URL: https://open.spotify.com/playlist/5t9TUKubTd0bOriqsxq79h
-
When prompted, input the name you would like to give to your new playlist.
- New playlist will be saved in your music library as
<playlist_name>.m3u
, overwriting any playlist of the same name.
- New playlist will be saved in your music library as
-
Finally, if your music library does not contain some of the songs in the Spotify playlist, the name and artist of each of those tracks will be saved to
missing_tracks.txt
in your music library. You'll be prompted with the following message:Some songs from this playlist were not found in your library. See missing_tracks.txt for details.
License
Spotipylist is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spotipylist-0.1.6.tar.gz
.
File metadata
- Download URL: spotipylist-0.1.6.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd2e0d84d1e8e77401fc0345d28d55ed144aa25b6865c7625a201601817da72 |
|
MD5 | 4ca7c4356b5ea1e2a302e2f5f400d969 |
|
BLAKE2b-256 | 8be3d0695909e4d8a1fd3fd7e74aa67f81b15ff2f63b4afcb43c175b31b6405d |
Provenance
File details
Details for the file spotipylist-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: spotipylist-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0d39744f7e17a665bea2edd387e2d81fea3affd06d2d0ec7d10c237b873cd4 |
|
MD5 | 8f5114e8909e463fbccf76254472dbd3 |
|
BLAKE2b-256 | 5fe9defed7149c724b7ec01973043192ee893c626dfadf67d04d2cb43ddab353 |