Coder Social home page Coder Social logo

syh192508 / netease-recent-actions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zonemeen/netease-recent-actions

0.0 0.0 0.0 9.81 MB

🎧 通过GitHub Action将你的网易云音乐的听歌记录生成一张svg卡片

License: MIT License

JavaScript 27.42% EJS 72.58%

netease-recent-actions's Introduction

Netease Recent Actions

🎧 通过GitHub Action将你的网易云音乐的听歌记录生成svg

⚙ 前置工作

获取网易云音乐用户 ID (https://music.163.com)

  • 您的个人主页页面(https://music.163.com/#/user/home?id=xxx),id 为紧跟的那串数字

user_id

🔨 使用

需使用Github Actions,参考这个仓库的这个文件的配置,触发更新会自动提交163.svg这个文件至您的目标仓库

示例:

163-示例

默认配置

163-default

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

听歌排行类型

163-type

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,即近一周的听歌排行

是否显示听歌次数对比百分比

163-percent

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,即不显示

主题模式

163-theme

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:暗夜模式

歌曲数量

163-number

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

标题

163-title

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

图片尺寸

163-size

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 尺寸较小、请求返回的时间变短,缺点是图片会失真变模糊

卡片单列宽度

163-width

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

列数

163-column

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 协议

netease-recent-actions's People

Contributors

zonemeen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.