Skip to content

orioncrocker/spotify_images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify_images

spotify_images provides a simple method of retrieving all unique album art from either a Spotify playlist or artist on Spotify and creating a collage from the query.

Installation:

git clone https://github.com/orioncrocker/spotify_images

Setup:

Before using this program, you'll need to get credentials from Spotify's API. An account on Spotify will provide two credentials: 'client id' and 'client secret.'

Modify the config.py file's two fields:

client_id = 'your_client_id'
client_secret = 'your_client_secret'

Two prerequisites you'll need installed on your machine are pillow and spotipy. You can easily get both of these from the pip repository after you've set up a virtual python3 environment.

python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt

Usage:

Download album art from an artist or playlist:

By default spotify_images fetches all unique art of any Spotify arist or playlist link given as an argument

python3 main.py https://open.spotify.com/playlist/13OSe3KLY2qnUrdP2Sv6j7

Verbose

Use the -v or --verbose flag to see what the program is doing in real time.

Create a collage

Use the -c or --collage flag to create a collage of the artwork downloaded.

python3 main.py -vc https://open.spotify.com/playlist/13OSe3KLY2qnUrdP2Sv6j7
Name: SRC#15
Type: playlist
results/src#15/blade_runner_(music_from_the_original_soundtrack).jpeg
results/src#15/low_country.jpeg
results/src#15/true_widow.jpeg
results/src#15/these_changing_skies.jpeg
results/src#15/odyssey.jpeg
results/src#15/can't_buy_happiness.jpeg
results/src#15/reptilians.jpeg
results/src#15/dangerous_days.jpeg
results/src#15/volume_1_(deluxe_edition).jpeg
results/src#15/led_zeppelin_iv.jpeg
results/src#15/lunz.jpeg
results/src#15/tempel.jpeg
12 saved to results/src#15
Total unique pictures: 12
Rows: 3	Cols: 4
Collage saved as: results/src#15.jpeg

The resulting collage:

Collage

Create a wallpaper

A specific aspect ratio can be selected by modifying the globals.py file. "16x9" is the value shipped with the software. Other available aspect ratios include "4x3", "16x10", "32x9". If you'd like to add specific aspect ratio, simply update the ratio_by_resolution table in collage.py.

Use the -w or --wallpaper flag to create a wallpaper of the artwork downloaded.

Wallpaper

Future features:

A website that hosts this code via Flask would be ideal so that anyone could utilize this software without the hassle of installation and configuration. However if I'm going do that I may as well rewrite this program in Javascript and save myself some trouble.

About

Download album artwork from a playlist or artist on Spotify

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages