A really easy way to display your spotify listening status on READMEs and Website.
APACHE-2.0 License
A really easy way to display your spotify listening status on READMEs and websites!
Here's the embed of the card from website.
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.
id
: Your spotify IDtheme
: The card themeimage
: If cover image to be includedcolor_theme
: The color theme for the Cardbars_when_not_listening
: If bars should be shown when not listeningbg_color
: The background color for the cardtitle_color
: The title color for the cardtext_color
: The text color for the cardhide_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.
The project uses pipenv for dependencies. Here's how to install the dependencies.
pipenv sync -d
http://localhost:5000/callback
to the URLs for development. Add the respective IP / Domain / Host/callback
to the end..env
Services account
tab, then the Database secrets
, select the Database we'reServices account
tab. Then download the service.env
andConfigure 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 itlocalhost: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.
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:
False
in config.py
flask.run(debug=DEBUG, host="<your-host>", port=<your-port>)
by replacingHere is the workflow on setting up:
.env
.pipenv
.pipenv run start
.Note: You can use the self hosted instance already running, or Self host your own instance like this.
There are several things planned for this project. Here are the TODOs, Kept public for reference, and transparent-ness.
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.
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