Content-Length: 333386 | pFad | http://github.com/Prem-ium/Spotify-Wrapped-365/#start-of-content

9A GitHub - Prem-ium/Spotify-Wrapped-365: Your Top Spotify Listening Habits, Favorite Artists, and Song Recommendations in a Playlist🎧🎶
Skip to content

Your Top Spotify Listening Habits, Favorite Artists, and Song Recommendations in a Playlist🎧🎶

License

Notifications You must be signed in to change notification settings

Prem-ium/Spotify-Wrapped-365

Repository files navigation

🎧 Spotify Wrapped 365 🎶

View your Spotify Top Tracks in a Playlist, Top Played Artists, & More!

Github Sponsor

Spotify Wrapped 365 Banner


Features

  • Generate Top Tracks Playlist that auto-updates!
  • Generate List of Top Played Artists
  • Generate Reccomended Tracks Playlists (API Endpoint Depreciated)
  • Optional Apprise Alerts/Notifications
  • Docker Support
  • Google Sheets Compatiable.
  • Keep_Alive Flask Server

Environment Variables

To run this project, you will need to add the following environment variables to your .env file (see .env.example for a reference):

Required .env:

Required .env

Environment Variable Description
CLIENT_ID Found on Spotify Developer Dashboard.
SECRET_CLIENT_ID Found on Spotify Developer Dashboard.
REDIRECT_URL The Redirect URL you added when creating the App on Spotify's Developer Dashboard. Check .env.example for reference.
USERNAME Your Spotify account username (can be found in Spotify account settings).

Optional Environment Variables:

Environment Variable Description Default Value
MINUTES The number of minutes to wait before updating the Top Tracks playlist. 360 (or 6 hours)
PUBLIC_PLAYLIST Determines whether to create a public playlist. Accepts boolean values (True/False). True
KEEP_ALIVE Whether to keep the Flask server running to prevent the program from sleeping on Replit. Accepts boolean values (True/False). False
APPRISE_ALERTS List of services and URLs for notifications. For more information, visit the Apprise Wiki. Not set
TZ The desired time zone, formatted according to the IANA Time Zone Database. America/New_York
AUTH_CACHE A cached JSON string retrieved during initial setup, useful for hosting 24/7 on platforms like Render or other free hosting providers. Not set
GSPREAD_KEYS Google Service Account JSON obtained via OAuth 2.0 Client ID from the Google Cloud API Credentials. Not set

Setup

Spotify Developer Credentials (Required)

  1. Visit the Spotify Developer Dashboard and log in with your Spotify credentials.

  2. Create a new application. Choose a name, provide a description (optional), and accept the Terms of Service.

  3. In the 'Edit Settings' section, add the redirect URL from your .env file, then save. Example:

    Redirect URL Example

  4. Click 'Show Client Secret'.

  5. Copy the Client ID and paste it into the CLIENT_ID field in your .env file. Similarly, copy the Client Secret and paste it into the SECRET_CLIENT_ID field.

    Client ID Example

Google Sheets/GSpread (Optional)

  1. Log in to the Google Cloud Console, create a new project, and enable the Google Sheets and Google Drive APIs.
  2. Navigate to API & Services > Credentials, then click Create Credentials > Service Account. Follow the prompts and download the resulting JSON file.
  3. In Google Sheets, create a new file named 'Wrapped365'. Add the following tabs: short_term, medium_term, long_term, short_term Artists, medium_term Artists, long_term Artists.
  4. Share the Google Sheet with the service account’s email (found in the downloaded JSON file or under the Google Cloud Console Credentials section). Grant it Editor permissions. The email will look like: wrapped-test@wrapped-test943892.iam.gserviceaccount.com.

Installation

This script can be used locally or using Docker.

Python

Clone the repository & Install dependencies

  git clone https://github.com/Prem-ium/Spotify-Wrapped-365.git
  cd Spotify-Wrapped-365
  pip install -r requirements.txt

Finally, you're ready to run the script!

  python main.py

Docker

  1. Run script locally with Python & generate cache file.

  2. Download and install Docker on your system

  3. Configure your .env file (See below and example for options)

  4. To build the image, cd into the repository and run:

    docker build -t spotify-wrapped .

    Then start the bot with:

    docker run -it --env-file ./.env --restart unless-stopped --name spotify-wrapped spotify-wrapped
  5. Let the bot log in and begin working. DO NOT PRESS CTRL-c. This will kill the container and the bot. To exit the logs view, press CTRL-p then CTRL-q. This will exit the logs view but let the bot keep running.


License

This repository is using the MIT license.


Experiencing Issues? 🛠️

I'm not available to respond to issues in this repository. For direct support, please consider sponsoring me below under the Silver or Gold tier. Keep in mind that the public version is mostly "as built" and is rarely updated, while the private Gold Sponsor version receives regular updates and support. Sponsor


Donations

I've been working on this project for a few months now, and I'm really happy with how it's turned out. It's also been a helpful tool for users to view their music data. If you appreciate my work and would like to show your support, there are two convenient ways to make a donation:

  1. GitHub Sponsors

    • Donate via GitHub Sponsors
    • This is the preferred donation method as it incurs no transaction fees & different tiers offer perks. GitHub Sponsor
  2. Buy Me A Coffee

  3. Referral Links

    • If you're unable to make a monetary donation, you can still support my work by using my curated Referral Links. Earn bonuses and rewards while contributing to my projects at the same time.
    • Explore Referral Links

Your generous donations will go a long way in helping me cover the expenses associated with developing new features and promoting the project to a wider audience. I extend my heartfelt gratitude to all those who have already contributed. Thank you for your support!


🎧 What I've been listening to









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Prem-ium/Spotify-Wrapped-365/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy