Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Shegszz authored May 20, 2024
1 parent 835f426 commit f6b513b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ Welcome to the Spotify Playlist Generator(Popular Tracks Analyzer) project! This
This open-source project is aimed at analyzing and curating playlists based on the popularity of tracks from a user's Spotify account. Leveraging the Spotify API and Python programming language, this project offers valuable insights into music preferences and trends. Additionally, as part of future development plans, I aim to incorporate the MusicMatch API to analyze the genres of the liked songs fetched from Spotify. While the Spotify API provides robust music data, to the best of my knowledge, it lacks a direct genre API endpoint. Therefore I plan to integrate the MusicMatch API for more comprehensive genre analysis and playlist curation, enhancing the accuracy and relevance of curated playlists not only on popularity but also on the genres that resonate with the user's preferences. Stay tuned for updates on this exciting enhancement to the project!

## Key Features
**Data Collection:** Fetches your liked songs from Spotify using the Spotify API
**Data Analysis:** Leverages pandas libraries for data manipulation and exploration to uncover insights into your listening habits.
**Playlist Creation:** Generates a playlist of your top 100 liked songs with sorting options based on popularity.
- **Data Collection:** Fetches your liked songs from Spotify using the Spotify API
- **Data Analysis:** Leverages pandas libraries for data manipulation and exploration to uncover insights into your listening habits.
- **Playlist Creation:** Generates a playlist of your top 100 liked songs with sorting options based on popularity.

## Project Structure
**README.md:** Detailed project overview, usage instructions, and technology used.
**main.py:** The Python script orchestrating the project, handling everything from API credentials setup to token exchange using PKCE for fetching liked songs, extracting data, and creating the playlist.
**index.html:** Landing page for user interaction
- **README.md:** Detailed project overview, usage instructions, and technology used.
- **main.py:** The Python script orchestrating the project, handling everything from API credentials setup to token exchange using PKCE for fetching liked songs, extracting data, and creating the playlist.
- **index.html:** Landing page for user interaction

## Technologies Used
- Python for scripting and API interactions.
Expand All @@ -43,24 +43,24 @@ The OAuth2 standard for Spotify defines four grant types or flows to request and
This project uses the authorization code with PKCE(proof key ), as it provides protection against attacks where the authorization code may be intercepted since it does not require our secret key. You can read more on the full guide for the implementation of the PKCE extension under the Authorization code with PKCE Flow.
- Develop an HTML file to serve as landing page using GitHub pages to facilitate user interaction.
To create an HTML file, follow these steps:
**a.** Navigate to the Cloned Repository Directory: Open your terminal (Command Prompt, Terminal, or equivalent).
- **a.** Navigate to the Cloned Repository Directory: Open your terminal (Command Prompt, Terminal, or equivalent).
Use the cd command to navigate to the directory where your cloned repository is located.
(For example:cd ~/Documents/repository-name).
Replace Documents with the name of the directory where your cloned repository is located, and repository-name with the actual name of your cloned repository directory.
**b.** Create the HTML File: Once you're in the correct directory, use a text editor or code editor in the terminal to create the index.html file. For example, you can use the nano text editor:
- **b.** Create the HTML File: Once you're in the correct directory, use a text editor or code editor in the terminal to create the index.html file. For example, you can use the nano text editor:
(nano index.html)
This command will open a new file named index.html in the nano editor within the terminal.
**c.** Add HTML Content: In the nano editor (or any other editor you make use of), add your HTML content for the landing page. You can use the HTML code provided in this repository or create your own content.
- **c.** Add HTML Content: In the nano editor (or any other editor you make use of), add your HTML content for the landing page. You can use the HTML code provided in this repository or create your own content.
- Move the HTML file to your GitHub repository. Then configure your GitHub pages to access your GitHub pages url where your landing page is hosted. You can follow the Getting started tutorial on GitHub pages.
- Make a request authorization from user's Spotify account to retrieve the authorization code, this redirects the user to Spotify for authorization by visiting the URL provided.
After authorization, Spotify will redirect back to the redirect URI with the authorization code. Then use the access token to fetch data from the Spotify Web API.
- Run the Python script to authenticate with Spotify, fetch liked tracks, and create the playlist.

## How to Use
**1.** Clone the repository.
**2.** Set up your Spotify API credentials and redirect URI.
**3.** Run the script to authorize and fetch liked songs.
**4.** Analyze data and create your curated playlist.
- **1.** Clone the repository.
- **2.** Set up your Spotify API credentials and redirect URI.
- **3.** Run the script to authorize and fetch liked songs.
- **4.** Analyze data and create your curated playlist.

## Future Improvements
- Expand analysis to include genre insights by leveraging the musicmatch API to analyze the genres of the liked songs fetched from Spotify.
Expand Down

0 comments on commit f6b513b

Please sign in to comment.