GithubHelp home page GithubHelp logo

songquanpeng / stats-cards Goto Github PK

View Code? Open in Web Editor NEW
253.0 6.0 37.0 109 KB

在 README 中展示你在知乎,GitHub,B 站,LeetCode,掘金,CSDN,牛客等网站的数据,也可用于服务状态监控. Show your LeetCode & GitHub stats in GitHub Profile.

Home Page: https://stats.justsong.cn/

License: MIT License

JavaScript 81.99% HTML 12.66% CSS 5.35%
readme-stats profile-readme leetcode zhihu bilibili juejin badge csdn nowcoder

stats-cards's Introduction

中文 | English

网站数据卡片

✨ 在 README 中展示网站数据,也可用于网站状态监控 ✨

license release release

描述 · 演示 · 赞赏 · 反馈

描述

支持的网站列表

当前支持以下网站,欢迎 PR:

  • 知乎
  • B 站
  • LeetCode
  • LeetCode 中文站
  • 掘金(By @jiweiyuan
  • 思否
  • 牛客
  • CSDN
  • GitHub
  • Steam
  • 网易云音乐
  • 自定义网站监控

支持的主题列表

支持多种主题,使用时在 url 后加入 &theme=<theme_name> 即可,例如: https://stats.justsong.cn/api/leetcode/?username=quanpeng&theme=dark

JustSong's LeetCode Stats JustSong's LeetCode Stats

主题列表:lightdarkmerkogruvboxgruvbox_lighttokyonightonedark...

完整主题列表参见 common/theme.js ,或参见 github-readme-stats 中的主题列表

支持的语言列表

默认语言为英文,如果想要更改为中文显示,在 url 后加入 &lang=zh-CN 即可,例如:

掘金酱的掘金数据 蓝天的 B 站数据

演示

注意,以下所有 URL 后面加上 &raw=true 可获得原始 JSON 数据。

自定义网站监控

自定义网站监控:https://stats.justsong.cn/api/website/?url=https://github.com/&style=flat&logo=github

其中 style 和 logo 是可选的, 具体取值参考 shield.io

注意监控不是实时的,其受到设置的缓存时间的影响

GitHub 监控 Google 监控 Zhihu 监控

网站数据展示

GitHub:https://stats.justsong.cn/api/github?username=songquanpeng

我的 GitHub 数据

知乎:https://stats.justsong.cn/api/zhihu?username=excited-vczh

注意不是你主页显示的用户名,而是是点开你的知乎主页,URL 中最后一段,例如是 https://www.zhihu.com/people/excited-vczh 中的 excited-vczh

轮子哥的知乎数据

B 站:https://stats.justsong.cn/api/bilibili/?id=666

id 为 666 的用户的 B 站数据

LeetCode 英文站:https://stats.justsong.cn/api/leetcode/?username=quanpeng

我的 LeetCode 数据

LeetCode 中文站:https://stats.justsong.cn/api/leetcode?username=quanpeng&cn=true

力扣数据

LeetCode 中文站英文站双修:https://stats.justsong.cn/api/leetcode?username=quanpeng&cn_username=quanpeng

我的 LeetCode 数据

掘金:https://stats.justsong.cn/api/juejin?id=1556564194374926

掘金数据

CSDN:https://stats.justsong.cn/api/csdn?id=vczh

CSDN 数据

牛客:https://stats.justsong.cn/api/nowcoder?id=6484283

牛客数据

部署

你可以通过 Vercel 进行部署,或者部署到自己的服务器上。

环境变量配置

部署的时候,有一些环境变量可以设置,均为可选:

  1. BILIBILI_SESSDATA:B 站的 SESSDATA Cookie,用以抓取 B 站数据,注意这个 Cookie 半年过期一次,届时需要重新设置 & 部署。
  2. GITHUB_TOKEN:GitHub Token,无任何权限的即可,用于抓取 GitHub 数据。
  3. CACHE_TIME:缓存时间,包括服务端缓存和客户端缓存,单位为秒,默认 6000,即 100 分钟。
  4. MAX_CACHE_ITEMS:最大缓存数量,默认 1024,缓存超出后将采取 LRU 策略进行淘汰。
  5. PORT:服务端口号,默认 3000

部署到 Vercel

  1. fork 本项目。
  2. Vercel 上选择导入 GitHub 仓库。
  3. 设置上述环境变量。

部署到自己的服务器

具体方法如下:

git clone https://github.com/songquanpeng/stats-cards.git
cd stats-cards
npm i
node ./app.js
# or
pm2 start ./app.js --name stats-cards

设置环境变量的方式:ENV_NAME=value cmd

  • 例如设置端口号:PORT=3000 node ./app.js

其他

  1. 创意参考 & 主题参考
  2. 如有爬虫失效,请及时提 issue!
  3. 卡片本身带有阴影效果,然而有些博客主题会自动给图片加阴影效果,这样将导致出现双重阴影,解决方法是使用 img 标签和 CSS 来移除博客主题提供的阴影效果,例如:<img src="https://stats.justsong.cn/api/leetcode?username=username&cn=true" style="box-shadow:none !important">
  4. 点击查看都有谁在使用

stats-cards's People

Contributors

i-linmeng-i avatar jiweiyuan avatar km911 avatar songquanpeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stats-cards's Issues

缓存问题

问题:
leetcode 进度更新之后,卡片并没有被更新

标签卡无法对齐

我使用https://github-readme-stats.vercel.app统计GitHub信息,并使用你的仓库统计CSDN信息,并希望将他们放置到同一行,

<p align="center">
  <a href="https://github.com/lazyn1997"><img src="https://github-readme-stats.vercel.app/api?username=lazyn1997&show_icons=true" alt="lazyn1997's Stats" ></a>
  <a title="CSDN" target="_blank" href="https://blog.csdn.net/qq_36949278"><img src="https://stats.justsong.cn/api/csdn?id=qq_36949278" ></a>
</p>

但是当我使用上述代码编辑好后发现两个卡片无法对齐,如下图所示,请问我该如何解决这个问题。
image

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.