Giter Club home page Giter Club logo

spotify-playlist-sorter-by-album-release-date's Introduction

Spotify playlist sorter

image

This script sorts your spotify playlist.

Sorting of the playlist follows these rules:

  1. Duplicate tracks will be removed.
  2. Tracks are sorted into groups of albums, that are ordered in the manner of the album.
  3. Albums are grouped by artist and release date. (Artist is determined from the album rather than the track)
  4. Artist groups are sorted depending on the first tracks appearance date on the playlist.

I haven't created a executable for linux or macOS. You can still use the python script as is if you would like.

Automation

To automate this process, you may use any utility that you seem fit. The script has arguments that can so that it can automatically sort a playlist.

python ./src/main.py --sort 'playlist url here'

It executes the sorting with console output. Recommended tools for the automation process is pm2.

For some guidance on how to use pm2, see this

How to use

Requirements

  • Spotify API credentials (SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET)
  • Python 3
  • Pip dependencies in the requirements.txt file

Get started

Create a config.json file where the executable is.
Insert the spotify client id and secret like this:

{
  "SPOTIPY_CLIENT_ID": "INSERT CLIENT ID HERE",
  "SPOTIPY_CLIENT_SECRET": "INSERT CLIENT SECRET HERE"
}

Install dependencies by running this command
pip install -r requirements.txt

Start the script by running
python ./src/main.py


There is an option to clone an existing playlist. This can be used to test the script before applying any permanent sorting to your original playlist.

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.