https://github.com/zonemeen/netease-recent-actions
🎧 通过GitHub Action将你的网易云音乐的听歌记录生成一张svg卡片
https://github.com/zonemeen/netease-recent-actions
Last synced: 7 months ago
JSON representation
🎧 通过GitHub Action将你的网易云音乐的听歌记录生成一张svg卡片
- Host: GitHub
- URL: https://github.com/zonemeen/netease-recent-actions
- Owner: zonemeen
- License: mit
- Created: 2022-10-26T09:07:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T22:16:21.000Z (over 1 year ago)
- Last Synced: 2024-03-31T23:23:16.245Z (over 1 year ago)
- Language: EJS
- Homepage:
- Size: 9.49 MB
- Stars: 23
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Netease Recent Actions
🎧 通过GitHub Action将你的网易云音乐的听歌记录生成svg
## ⚙ 前置工作
获取网易云音乐用户 ID (https://music.163.com)
- 您的个人主页页面(`https://music.163.com/#/user/home?id=xxx`),`id` 为紧跟的那串数字

## 🔨 使用
需使用Github Actions,参考这个[仓库](https://github.com/zonemeen/zonemeen)的这个[文件](https://github.com/zonemeen/zonemeen/blob/a8c4549f38fd0ba254e3650eb0832a9e3cd1eb58/.github/workflows/job-work.yml)的配置,触发更新会自动提交`163.svg`这个文件至您的目标仓库
示例:

### 默认配置

```yml
name: Netease Recent Actionson:
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
```### 听歌排行类型

```yml
name: Netease Recent Actionson:
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,即近一周的听歌排行
### 是否显示听歌次数对比百分比

```yml
name: Netease Recent Actionson:
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`,即不显示
### 主题模式

```yml
name: Netease Recent Actionson:
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`:暗夜模式
### 歌曲数量

```yml
name: Netease Recent Actionson:
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`条
### 标题

```yml
name: Netease Recent Actionson:
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`
### 图片尺寸

```yml
name: Netease Recent Actionson:
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 尺寸较小、请求返回的时间变短,缺点是图片会失真变模糊
### 卡片单列宽度

```yml
name: Netease Recent Actionson:
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`
### 列数

```yml
name: Netease Recent Actionson:
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](./LICENSE) 协议