netease-recent-actions
netease-recent-actions copied to clipboard
🎧 通过GitHub Action将你的网易云音乐的听歌记录生成一张svg卡片
Netease Recent Actions
🎧 通过GitHub Action将你的网易云音乐的听歌记录生成svg
⚙ 前置工作
获取网易云音乐用户 ID (https://music.163.com)
- 您的个人主页页面(
https://music.163.com/#/user/home?id=xxx
),id
为紧跟的那串数字
🔨 使用
需使用Github Actions,参考这个仓库的这个文件的配置,触发更新会自动提交163.svg
这个文件至您的目标仓库
示例:
默认配置
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0' # 北京时间每周一上午6点自动更新
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest # 使用最新版本,最新版本查看https://github.com/marketplace/actions/netease-recent-actions
with:
id: '126764012' # 你的网易云音乐账号id
听歌排行类型
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
type: '0'
配置说明:0
:为所有时间的听歌排行;1
:默认为1,即近一周的听歌排行
是否显示听歌次数对比百分比
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
show_percent: '1'
配置说明:自定义为1
,即显示听歌次数对比百分比;默认为0
,即不显示
主题模式
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
theme: 'light'
配置说明:主题模式自定义为light
:浅色模式,默认为dark
:暗夜模式
歌曲数量
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
number: 3
配置说明:歌曲数量自定义为3
条,默认为5
条
标题
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
title: '最近在听'
配置说明:标题自定义为最近在听
,默认为Recently Played
图片尺寸
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
size: 60
配置说明:图片尺寸自定义为60
,默认为800
;尺寸越小,优点是 svg 尺寸较小、请求返回的时间变短,缺点是图片会失真变模糊
卡片单列宽度
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
width: 380
配置说明:卡片单列宽度自定义为380
,默认为280
列数
name: Netease Recent Actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '00 22 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: zonemeen/netease-recent-actions@latest
with:
id: '126764012'
column: 2
配置说明:列数自定义为2
,默认为1
📄 开源协议
本项目使用 MIT 协议