Skip to content

Commit

Permalink
Customizable Workout Playlist Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutosh das authored and ashutosh das committed Oct 24, 2024
1 parent 8c6ae32 commit b2fe96b
Show file tree
Hide file tree
Showing 4 changed files with 671 additions and 0 deletions.
56 changes: 56 additions & 0 deletions Customizable_Workout_Playlist_Generator/README_SONG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Customizable Workout Playlist Generator

This Python application generates customized workout playlists based on user preferences, including workout type, duration, preferred genres, and BPM range. It can use a local song database or integrate with popular music streaming services like Spotify, Apple Music, and YouTube Music.

## Features

- Generate playlists for various workout types (e.g., HIIT, yoga, cardio)
- Customize playlist duration
- Filter songs by genre and BPM range
- Integration with Spotify, Apple Music, and YouTube Music (API keys required)
- Save and load playlists in JSON format

## Requirements

- Python 3.6+
- Required Python packages (see `requirements.txt`)

## Installation

1. Clone this repository:
```
git clone https://github.com/Ashutoshdas-dev/All-In-One-Python-Projects.git
cd Customizable_Workout_Playlist_Generator
```

2. Install the required packages:
```
pip install -r requirements.txt
```

3. Set up API credentials for the music services you want to use (Spotify, Apple Music, or YouTube Music).

## Usage

1. Run the main script:
```
python playlist.py
```

2. Follow the prompts to:
- Choose a music source (local database, Spotify, Apple Music, or YouTube Music)
- Enter workout type, duration, preferred genres, and BPM range
- Generate and view the playlist
- Save the playlist to a JSON file (optional)

3. Repeat the process to generate multiple playlists or exit the program.

## API Integration

To use the music streaming service integrations, you'll need to set up API credentials:

- Spotify: Set up a Spotify Developer account and create an app to get your client ID and client secret.
- Apple Music: Obtain an Apple Developer account and set up MusicKit.
- YouTube Music: No authentication is required for basic usage.

Update the respective client classes in `playlist.py` with your API credentials.
317 changes: 317 additions & 0 deletions Customizable_Workout_Playlist_Generator/hiit_playlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
[
{
"title": "Lose Yourself",
"artist": "Eminem",
"duration": 326,
"bpm": 171,
"genre": "hip-hop"
},
{
"title": "Till I Collapse",
"artist": "Eminem",
"duration": 297,
"bpm": 171,
"genre": "hip-hop"
},
{
"title": "God's Plan",
"artist": "Drake",
"duration": 198,
"bpm": 154,
"genre": "hip-hop"
},
{
"title": "Blinding Lights",
"artist": "The Weeknd",
"duration": 200,
"bpm": 171,
"genre": "pop"
},
{
"title": "Sicko Mode",
"artist": "Travis Scott",
"duration": 312,
"bpm": 155,
"genre": "hip-hop"
},
{
"title": "In the End",
"artist": "Linkin Park",
"duration": 217,
"bpm": 105,
"genre": "rock"
},
{
"title": "HUMBLE.",
"artist": "Kendrick Lamar",
"duration": 177,
"bpm": 150,
"genre": "hip-hop"
},
{
"title": "Shape of You",
"artist": "Ed Sheeran",
"duration": 233,
"bpm": 96,
"genre": "pop"
},
{
"title": "Rockstar",
"artist": "Post Malone",
"duration": 218,
"bpm": 80,
"genre": "hip-hop"
},
{
"title": "Senorita",
"artist": "Shawn Mendes",
"duration": 190,
"bpm": 117,
"genre": "pop"
},
{
"title": "Bad Guy",
"artist": "Billie Eilish",
"duration": 194,
"bpm": 135,
"genre": "pop"
},
{
"title": "Believer",
"artist": "Imagine Dragons",
"duration": 204,
"bpm": 125,
"genre": "rock"
},
{
"title": "Old Town Road",
"artist": "Lil Nas X",
"duration": 157,
"bpm": 136,
"genre": "hip-hop"
},
{
"title": "7 Rings",
"artist": "Ariana Grande",
"duration": 178,
"bpm": 70,
"genre": "pop"
},
{
"title": "Sunflower",
"artist": "Post Malone",
"duration": 158,
"bpm": 90,
"genre": "hip-hop"
},
{
"title": "No Tears Left to Cry",
"artist": "Ariana Grande",
"duration": 206,
"bpm": 122,
"genre": "pop"
},
{
"title": "Lucid Dreams",
"artist": "Juice WRLD",
"duration": 239,
"bpm": 84,
"genre": "hip-hop"
},
{
"title": "Memories",
"artist": "Maroon 5",
"duration": 189,
"bpm": 91,
"genre": "pop"
},
{
"title": "Savage Love",
"artist": "Jawsh 685 & Jason Derulo",
"duration": 171,
"bpm": 96,
"genre": "pop"
},
{
"title": "Levitating",
"artist": "Dua Lipa",
"duration": 203,
"bpm": 103,
"genre": "pop"
},
{
"title": "One Dance",
"artist": "Drake",
"duration": 173,
"bpm": 104,
"genre": "afrobeats"
},
{
"title": "Stressed Out",
"artist": "Twenty One Pilots",
"duration": 185,
"bpm": 85,
"genre": "alternative"
},
{
"title": "Radioactive",
"artist": "Imagine Dragons",
"duration": 186,
"bpm": 136,
"genre": "rock"
},
{
"title": "Rolling in the Deep",
"artist": "Adele",
"duration": 228,
"bpm": 105,
"genre": "pop"
},
{
"title": "Closer",
"artist": "The Chainsmokers",
"duration": 244,
"bpm": 95,
"genre": "electronic"
},
{
"title": "Shake It Off",
"artist": "Taylor Swift",
"duration": 219,
"bpm": 160,
"genre": "pop"
},
{
"title": "Uptown Funk",
"artist": "Mark Ronson ft. Bruno Mars",
"duration": 269,
"bpm": 115,
"genre": "funk"
},
{
"title": "Sorry",
"artist": "Justin Bieber",
"duration": 200,
"bpm": 100,
"genre": "pop"
},
{
"title": "The Middle",
"artist": "Zedd, Maren Morris",
"duration": 184,
"bpm": 99,
"genre": "electronic"
},
{
"title": "Shallow",
"artist": "Lady Gaga & Bradley Cooper",
"duration": 215,
"bpm": 96,
"genre": "pop"
},
{
"title": "Despacito",
"artist": "Luis Fonsi ft. Daddy Yankee",
"duration": 229,
"bpm": 89,
"genre": "reggaeton"
},
{
"title": "Attention",
"artist": "Charlie Puth",
"duration": 211,
"bpm": 100,
"genre": "pop"
},
{
"title": "Stay",
"artist": "The Kid LAROI & Justin Bieber",
"duration": 141,
"bpm": 170,
"genre": "pop"
},
{
"title": "Circles",
"artist": "Post Malone",
"duration": 215,
"bpm": 120,
"genre": "pop"
},
{
"title": "Call Out My Name",
"artist": "The Weeknd",
"duration": 234,
"bpm": 135,
"genre": "R&B"
},
{
"title": "Heat Waves",
"artist": "Glass Animals",
"duration": 239,
"bpm": 81,
"genre": "pop"
},
{
"title": "Good 4 U",
"artist": "Olivia Rodrigo",
"duration": 178,
"bpm": 170,
"genre": "pop-punk"
},
{
"title": "Montero (Call Me By Your Name)",
"artist": "Lil Nas X",
"duration": 137,
"bpm": 89,
"genre": "hip-hop"
},
{
"title": "Industry Baby",
"artist": "Lil Nas X ft. Jack Harlow",
"duration": 212,
"bpm": 150,
"genre": "hip-hop"
},
{
"title": "Dynamite",
"artist": "BTS",
"duration": 199,
"bpm": 114,
"genre": "pop"
},
{
"title": "Peaches",
"artist": "Justin Bieber ft. Daniel Caesar",
"duration": 198,
"bpm": 90,
"genre": "R&B"
},
{
"title": "Positions",
"artist": "Ariana Grande",
"duration": 172,
"bpm": 100,
"genre": "pop"
},
{
"title": "Watermelon Sugar",
"artist": "Harry Styles",
"duration": 174,
"bpm": 96,
"genre": "pop"
},
{
"title": "Say So",
"artist": "Doja Cat",
"duration": 237,
"bpm": 111,
"genre": "pop"
},
{
"title": "Mood",
"artist": "24kGoldn ft. Iann Dior",
"duration": 140,
"bpm": 91,
"genre": "hip-hop"
}
]
Loading

0 comments on commit b2fe96b

Please sign in to comment.