Code Monkey home page Code Monkey logo

tunecraft's Introduction

TuneCraft: Spotify Playlist Generator

GitHub license

Table of Contents

About

TuneCraft is a unique Spotify playlist generator that creates new playlists based on your existing playlists, musical taste, and specified criteria. Designed to help you explore new music while maintaining a familiar sound, TuneCraft ensures that it recommends new songs by checking all your liked songs and songs that exist in your playlists.

The main code is located in the main.py file. Functions for interacting with the Spotify API and generating playlists can be found in the same file.

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites

You need to have a machine with Python >= 3.6 and any Bash-based shell (e.g. zsh) installed.

$ python3.10 -V
Python 3.10

$ echo $SHELL
/usr/bin/zsh

Installing the requirements

Using the Makefile

All the installation steps are being handled by the Makefile.

Then, to create a conda environment, install the requirements, setup the library and run the tests execute the following commands:

$ make create_env
$ conda activate tunecraft
$ make requirements

Running the code

Execution Options

First, make sure you are in the correct virtual environment:

$ conda activate tune_craft

$ which python
/home/<user>/anaconda3/envs/src/bin/python

main.py

Now, in order to run the code you can call the main.py directly.

$ python main.py -h
usage: main.py -u USER_ID [-s SEED_PLAYLIST] [-nt NUMBER_TRACKS] [--new-artists] [--refresh] [--list-playlists] [-h]

TuneCraft - Spotify Playlist Generator

Required Arguments:
  -u USER_ID, --user-id USER_ID
                        Your Spotify user ID

Optional Arguments:
  -s SEED_PLAYLIST, --seed-playlist SEED_PLAYLIST
                        The seed playlist ID to generate a new playlist from
  -nt NUMBER_TRACKS, --number-tracks NUMBER_TRACKS
                        Number of tracks in the generated playlist
  --new-artists         Include only new artists
  --refresh             Refresh the local database from Spotify
  --list-playlists      List all your playlists
  -h, --help            Show this help message and exit

Usage Examples

Generate a new playlist based on a seed playlist ID with 20 tracks:

$ python main.py -u your_user_id -s your_seed_playlist_id -nt 20

Generate a new playlist with only new artists:

$ python main.py -u your_user_id -s your_seed_playlist_id --new-artists

List all your playlists:

$ python main.py -u your_user_id --list-playlists

Refresh the local database and list all your playlists:

$ python main.py -u your_user_id --refresh --list-playlists

Todo

Add support for generating playlists based on moods and genres. Implement a web interface for easier user interaction. Improve the playlist generation algorithm for better recommendations.

License

This project is licensed under the Apache License - see the LICENSE file for details.

tunecraft's People

Contributors

drkostas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.