当前位置: 首页 > 软件库 > Web应用开发 > Web框架 >

spotify-playing-readme

授权协议 Apache-2.0 License
开发语言 Python
所属分类 Web应用开发、 Web框架
软件类型 开源软件
地区 不详
投 递 者 平羽
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Spotify playing README

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

Demo

Here's the embed of Card from the site.

Customized card, with theming

Security notice

As a security notice, We're not storing any of the sensitive tokens, We just store theaccess tokens securely, used for generating temporary refresh tokens, and getting just the status data, withonly 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 BG 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 / Hostif 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'reusing 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 serviceaccount 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 andEncode it using Base64 after that.

Setting up .env

Configure the environmental variables by renaming the .env.example file to .env with the respectivevalues 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 itto 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 runfunction. 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 onoption configuration is also given. It is recommended to run with Debug mode off, and Yourspecific 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 replacingthe 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 canjust 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 understandabout your commit or the PR Created. Readconventional commits before making the commit message.

Show your support

We love people's support in growing and improving. Be sure to leave a ⭐️ if you like the project andalso be sure to contribute, if you're interested!

Inspired by Novatorem

Made by Sunrit Jana with ❤️
  • What is Spotify? Spotify is one of the most broadly utilized music-streaming application, which not just permits you to tune in to a great many soundtracks yet it likewise enables you to make your own

 相关资料
  • 这是一个为传统角色扮演游戏提供相关工具的开源项目。当前包括的工具有:MapTool:这是一个可在C/S架构上为多个玩家提供地图与地图数据共享的图 形工具。DiceTool:这是一个能够在角色扮演游戏中推测死亡表达式的工具,它还可通过JavaScripts扩展各种计算。TokenTool:方 便创建MapTool标记(tokens).

  • 在QML应用程序中,最基本的媒体应用是播放媒体。使用MediaPlayer元素可以完成它,如果源是一个图片或者视频,可以选择结合VideoOutput元素。MediaPlayer元素有一个source属性指向需要播放的媒体。当媒体源被绑定后,简单的调用play函数就可以开始播放。 如果你想播放一个可视化的媒体,例如图片或者视频等,你需要配置一个VideoOutput元素。MediaPlayer播放

  • Spotify Profile A web app for visualizing personalized Spotify data Built with a bunch of things, but to name a few: Spotify Web API Create React App Express Reach Router Styled Components Setup Regis

  • Angular Spotify A simple Spotify client built with Angular 12, Nx workspace, ngrx, TailwindCSS and ng-zorro. I have recently shared about #angularspotify at AngularAir, you can watch the session here

  • 我试图允许用户使用Spotify登录(使用Spotipy库),以提供在其帐户上创建播放列表并填充播放列表的身份验证。用户登录后,我将通过嵌入式Spotify播放器(使用新创建的播放列表的播放列表ID)显示他们刚刚在重定向模板中创建的播放列表。 我的HTML模板中有一个表单输入框,接受用户的输入(他们的Spotify用户名)。我还有一个Spotify URIs的列表,可以用来填充播放列表。 我按照S

  • SwagLyrics-For-Spotify Fetches the currently playing song from Spotify on Windows, Linux and macOS and displays the lyrics in the command-line, browser tab or in a desktop application.Refreshes automa