Giter Site home page Giter Site logo

spotify_images's Introduction

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. If you aren't yet aware of the beauty of pip, go check out it's website. You're welcome.

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 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:

Unleash The Archers Collage

Future features:

I would love to be able to specify a width and height for the purposes of creating wallpapers. Additionally, 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.

spotify_images's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spotify_images's Issues

Index Out Of Bounds when geenerating collage

(i know you said you were thinking of redoing this in JS so dont want to bombard you with stuff, but since you requested i let you know if anything else is broken.. ;) )
"
python3 main.py -vc "https://open.spotify.com/playlist/2YekdozcgWTiXh2vGoJ6ii?si=0f87917738a54161"
playlist found, downloading...
Name: Jeremy's Top Albums of 2017
Type: playlist
0 saved to results/jeremy's_top_albums_of_2017
Total unique pictures: 11
Rows: 3 Cols: 4
Traceback (most recent call last):
File "/Users/jeremymeyers/Documents/GitHub/spotify_images/main.py", line 41, in
main()
File "/Users/jeremymeyers/Documents/GitHub/spotify_images/main.py", line 37, in main
collage.make_collage(directory=directory, verbose=args.verbose)
File "/Users/jeremymeyers/Documents/GitHub/spotify_images/collage.py", line 58, in make_collage
new_row.paste(pics[count], (x_offset,0))
IndexError: list index out of range
"

Authentication Warning

I believe spot may have changed their API authentication stuff because i'm getting a 401 error when trying to pull from a URL.

(ive added ID and secret to config.py)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.