Skip to content

🎧 在 Github Profile 上显示你这周在网易云音乐上最喜欢听的歌曲 🎵

License

Notifications You must be signed in to change notification settings

Aurnee/netease-music-card

 
 

Repository files navigation

Netease Cloud Music Card

🎧 在 Github Profile 显示你这周在网易云音乐上最喜欢听的歌曲 🎵

🚀使用方法:

🎒 Fork 一份此仓库或者自己新建一个仓库

1. 获取网易云音乐用户 id

image

然后修改 main.yml 中的 USER_ID

2. 获取网易云音乐用户的 TOKEN

  • 打开网页控制台,找到 Application 下 Cookie 为 MUSIC_U 的值 }QV)3FH9@L9LUJ({35JJI}M
  • 打开自己项目中的设置,找到 Secrets 新建一个名为 USER_TOKENSecrets image
  • 将第一步获取到的值粘贴进去

3. 修改 main.yml

main.yml 中的 AUTHOR 修改为自己的 Github 用户名即可

4. 引用图片

最后只需要在你的 github profile 仓库添加图片链接即可

![card](https://github.com/你的 Github 用户名/netease-music-card/blob/main/card.svg)

你也可以使用 Jsdelivr CDN 来引用图片

![card](https://cdn.jsdelivr.net/gh/你的 Github 用户名/netease-music-card/card.svg)

你也可以将这个图片部署到你的博客等地方 😋

💨 本地测试:

Fork 项目或者新建一份。

npm install

card 文件夹下为测试界面部分,可以自己设计界面。

如果你想直接在仓库的 workflow 里面查看详细的输出,可以不需要 .env 文件

如果你想在本地测试网易云 API 并且查看,请填写相应的值,并注意在 push 到仓库之前删除它

❤️ 灵感和帮助:

🤔 工作原理:

  • 使用 NeteaseCloudMusicApi 获取听歌记录
  • 基于 Github API 将 index.js 处理好的 svg 写入到仓库中
  • 使用 Github Actions 定期更新 card.svg

📄 开源协议

MIT License

Copyright (c) 2021 Nthily

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

🎧 在 Github Profile 上显示你这周在网易云音乐上最喜欢听的歌曲 🎵

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.6%
  • CSS 12.8%
  • HTML 8.5%
  • Shell 0.1%