Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Perl script to stitch cover art montages out of Spotify playlists

License

NotificationsYou must be signed in to change notification settings

deepakg/spotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Album art collage

spotify-collage.pl takes a url to a Spotify playlist and stitches a collage of album art images of the tracks in that playlist.

  • The album art images are resized to 200x200 pixels
  • The images are laid out in a 4:3 grid
  • The generated collage is saved in .png format in the folder that you run this script in.

Usage

Before you can use the script, you’ll need to set up anapplication on Spotify. This will give you a client_id and client_secret. You'll need to save these to a file called .api_keys in your home directory:

[spotify]client_id = <your client_id>client_secret = <your client_secret>

This script also has following dependencies that you'd need to install from CPAN:

  • Config::INI::Reader
  • Imager::Montage
  • JSON::XS

You should then be able to run the script as:

perl spotify-collage.pl --playlist https://open.spotify.com/user/beatlesplaylists/playlist/1FbXE0DKfcNlIRexSEHcs8
Fetching bearer tokenFetching page: 1Found 50 tracks from 17 unique albums with album art./var/folders/pj/j3y2rdf17l51zqhcmqfy6lnr0000gn/T/spotify-montage-y76SDownloading 1 of 17Downloading 2 of 17Downloading 3 of 17Downloading 4 of 17Downloading 5 of 17Downloading 6 of 17Downloading 7 of 17Downloading 8 of 17Downloading 9 of 17Downloading 10 of 17Downloading 11 of 17Downloading 12 of 17Downloading 13 of 17Downloading 14 of 17Downloading 15 of 17Downloading 16 of 17Downloading 17 of 17Filling 17 images into a collage of 3 rows and 5 columnsMontage written to ./spotify-montage-QRht.png

If you run it without the --playlist option, it'll use this hardcoded playlist with 8 songs:https://open.spotify.com/user/deepak.gulati/playlist/7EhvGQRwc71oEpRjvEV6uR

Supported Platforms

I've only tested this script on macOS 10.12.3. If you have a working installation of Perl 5.14 or higher and are able to install the dependencies, itshould work on older versions of macOS as well. It might work on Linux with little or no tweaking but about Windows I am considerably less sure.


[8]ページ先頭

©2009-2025 Movatter.jp