All Projects β†’ janaSunrise β†’ spotify-playing-readme

janaSunrise / spotify-playing-readme

Licence: Apache-2.0 license
A really easy way to display your spotify listening status on READMEs and Website.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
Jinja
831 projects
shell
77523 projects

Projects that are alternatives of or similar to spotify-playing-readme

Metrics
πŸ“Š An infographics generator with 30+ plugins and 200+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!
Stars: ✭ 4,621 (+21904.76%)
Mutual labels:  github-api, readme-profile
Spotify-Customizer
Chrome extension to customize Spotify web client (themes, lyrics, ...)
Stars: ✭ 27 (+28.57%)
Mutual labels:  spotify
gitbot
The most popular Discord dev toolkit with 400k+ users πŸš€βœ¨
Stars: ✭ 59 (+180.95%)
Mutual labels:  github-api
spotifypiHome
"Install and go" multiroom music playback solution, with support for spotify, airplay and bluetooth.
Stars: ✭ 32 (+52.38%)
Mutual labels:  spotify
BTSpotifyGeeklet
Geeklet for Spotify player, shows track info and artwork
Stars: ✭ 12 (-42.86%)
Mutual labels:  spotify
gmusic wrapped
A spotify 'year wrapped' like for Google Play Music
Stars: ✭ 44 (+109.52%)
Mutual labels:  spotify
lowlighter
πŸ¦‘ A GitHub profile auto-generated with metrics, starred topics, an isometric contribution calendar, suggested music tracks, website performances, most used languages, etc. !
Stars: ✭ 161 (+666.67%)
Mutual labels:  readme-profile
spotify-cli
Spotify for the terminal 🎡
Stars: ✭ 295 (+1304.76%)
Mutual labels:  spotify
milaan9
No description or website provided.
Stars: ✭ 190 (+804.76%)
Mutual labels:  readme-profile
Spotify-Readme
A dynamic, customizable, and real-time Spotify now-playing widget for your README files.
Stars: ✭ 85 (+304.76%)
Mutual labels:  spotify
watchub
Be notified of people who followed/unfollowed you and starred/unstarred your repositories
Stars: ✭ 55 (+161.9%)
Mutual labels:  github-api
peterthehan
My personal site and profile README.
Stars: ✭ 36 (+71.43%)
Mutual labels:  readme-profile
lavalink-music-bot-2021
Advance Discord Lavalink Music Bot With Spotify and Buttons Help Menu || Best Music Quality || Radio Commands
Stars: ✭ 26 (+23.81%)
Mutual labels:  spotify
distube-music-bot
An advanced music bot based on distube.js.org with filters and more
Stars: ✭ 24 (+14.29%)
Mutual labels:  spotify
muffon
Music streaming browser
Stars: ✭ 491 (+2238.1%)
Mutual labels:  spotify
gh
Control GitHub from your Terminal
Stars: ✭ 28 (+33.33%)
Mutual labels:  github-api
github-profile-views-counter
πŸš€ Set up this GitHub profile views counter for your profile that does not require any services to record profile views
Stars: ✭ 66 (+214.29%)
Mutual labels:  github-api
hoergewohnheiten
Save your Spotify plays to a Postgres database and run a Flask app to provide listening stats.
Stars: ✭ 16 (-23.81%)
Mutual labels:  spotify
gityeller
Stay in the loop of your favorite Github repositories.
Stars: ✭ 18 (-14.29%)
Mutual labels:  github-api
useful-forks.github.io
Improving GitHub's Forks list discoverability through automatic filtering. The project offers an online tool and a Chrome extension.
Stars: ✭ 917 (+4266.67%)
Mutual labels:  github-api

Spotify playing README

A really easy way to display your spotify listening status on READMEs and websites!

Demo

Here's the embed of the card from website.

Spotify playing

Customized card, with theming

Spotify playing

Security notice

As a security notice, We're not storing any of the sensitive tokens. We just store the refresh tokens securely used for generating access tokens, and to get the status data, with only read permissions and scopes. You can check it in the configuration file for the scopes.

URL Parameters

  • id: Your spotify ID
  • theme: The card theme
  • image: If cover image to be included
  • color_theme: The color theme for the Card
  • bars_when_not_listening: If bars should be shown when not listening
  • bg_color: The background color for the card
  • title_color: The title color for the card
  • text_color: The text color for the card
  • hide_status: If the status for song should be shown.

NOTE: You can generate the card easily by visiting the panel. Check the repo description link for it.

Setting up the development environment

Install the dependencies

The project uses pipenv for dependencies. Here's how to install the dependencies.

pipenv sync -d

Setting up Spotify API for the project

  • Go to the developer panel at spotify. Panel URL
  • Make an APP, Specify the name, and description.
  • Add http://localhost:5000/callback to the URLs for development. Add the respective IP / Domain / Host if you're self hosting this App with the path of /callback to the end.
  • Take a note of the Client ID, and Client Secret for setting up .env

Setting up Firebase

  • Go to the firebase panel.
  • Make a new project, and setup as a Web SDK and enable it.
  • Go to Settings, and the web apps section, and copy the config, and keep a note.
  • Then go to the Services account tab, then the Database secrets, select the Database we're using and copy the API.
  • Copy the domain from Realtime Database section in left, after initializing it.
  • Finally, For service accounts, Go to the Services account tab. Then download the service account credentials and save it. Once done, Open VSCode, Download Base64 Encode extension, if you don't already have it. The Copy and Paste the JSON file contents in the .env and Encode it using Base64 after that.

Setting up .env

Configure the environmental variables by renaming the .env.example file to .env with the respective values for it.

Here's the info about the .env variables

  • BASE_URL: This is the basic URL for getting the Callback URLs and more, set it to localhost:5000 in development mode.
  • SPOTIFY_CLIENT_ID: This is the spotify client ID.
  • SPOTIFY_SECRET_ID: This is the Spotify Secret.
  • FB_API_KEY: This is the API key for firebase, from Database secrets.
  • FB_DOMAIN: This is the domain from Realtime Database section.
  • FB_PROJECT_ID: This is the Project ID from normal firebase config.
  • FB_STORAGE_BUCKET: The storage bucket from the normal firebase config.
  • FB_MESSAGING_ID: The messaging ID from normal firebase config.
  • FB_DATABASE_URL: The database URL from firebase config.
  • FB_SERVICE_ACCOUNT: The service account credentials obtained from the settings and encoded using base64.

NOTE: Use the VSCode Base64 encode extension to encode the contents of the Service Account JSON file.

You can change the port when self hosting / running by adding a port parameter to flask_app's run function. You can do so like this flask_app.run(debug=DEBUG, port=<the-port-you-need>)

Once done, Run the server using pipenv run start. It should boot up at localhost:5000 in development mode, or the settings you have provided.

Deploying your own instance

To deploy your own instance, You need a proper hosting platform to run Python webapps. You can use Heroku, PythonAnywhere, Your own server or anywhere else.

To self-host your instance, The steps are given above on how to do it. The instructions on option configuration is also given. It is recommended to run with Debug mode off, and Your specific host and port.

You can do so, like this:

  • Turn debug off, by toggling the Debug option to False in config.py
  • Change host and port: flask.run(debug=DEBUG, host="<your-host>", port=<your-port>) by replacing the values given inside the angle brackets.

Here is the workflow on setting up:

  • Setup Spotify API and note it.
  • Setup Firebase for data store and note the API.
  • Fill the values as said in .env.
  • Configure the options as needed.
  • Install dependencies using pipenv.
  • Run using pipenv run start.
  • And, you should be good to go.

Note: You can use the self hosted instance already running, or Self host your own instance like this.

TODOs Planned

There are several things planned for this project. Here are the TODOs, Kept public for reference, and transparent-ness.

  • FAQ
    • How to contribute
    • How to add a theme
    • How to work with options
    • Adding more features
    • Customization
  • Improve the current themes
  • Add more themes
  • Add more customization options
    • Previews when customizing the card
    • Allow customizing Background and font color (Will be redeveloped, with all security issues fixed)
    • Marquee show
    • Display bars when not listening.
    • Allow linking to your profile along with the link.
    • Color Theme
    • Abiltiy to Hide status
    • HTML Image tag generation
    • Add same color to either of the text / title, if either of them is left empty, so the color pallet is fine.

🀝 Contributing

Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.

⚠️ It’s good to have descriptive commit messages, or PR titles so that other contributors can understand about your commit or the PR Created. Read conventional commits before making the commit message.

Show your support

We love people's support to grow, improve and give the best. Be sure to drop a 🌟 if you like the project, and also contribute, if you're interested!

Inspired by Novatorem

Made by Sunrit Jana with ❀️
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].