https://github.com/yikoutian1/github-contribute
此项目为获取Github每日贡献数据(Python+Npm)
https://github.com/yikoutian1/github-contribute
github-contributions
Last synced: 5 months ago
JSON representation
此项目为获取Github每日贡献数据(Python+Npm)
- Host: GitHub
- URL: https://github.com/yikoutian1/github-contribute
- Owner: Yikoutian1
- Created: 2024-03-16T08:29:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-27T13:34:14.000Z (almost 2 years ago)
- Last Synced: 2024-12-27T18:24:34.314Z (about 1 year ago)
- Topics: github-contributions
- Language: Python
- Homepage: https://github-contribute.calyee.top
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 项目是用来做什么的?
获取 GitHub 的用户贡献信息
此项目原理是通过 Python 获取 GitHub 的用户贡献信息,你可以部署到 Vercel 上作为 API 使用。
如果你有 Hexo 博客,可以搭配使用 hexo-get-github-contribute 插件在前端渲染贡献热力图。(此插件是参考[fork作者](https://github.com/Zfour/python_github_calendar_api)所修改的)
# 如何访问?
部署后, 通过基地址+/api?user=Yikoutian1
例如: https://xxxx.vercel.app/api?user=Yikoutian1
> 你可以选择自定义域名绑定到vercel
# 如何使用
```
npm i hexo-get-github-contribute --save
```
如果你是hexo相关的主题, 那么在根目录配置文件 即_config.yml
添加如下配置
```yaml
# github贡献图
githubcalendar:
enable: true
priority: 3
enable_page: /
user: user=yikoutian1
layout:
type: id
name: recent-posts
index: 0
githubcalendar_html: '
'
pc_minheight: 248px
mobile_minheight: 0px
color: "['#ebedf0', '#fdcdec', '#fc9bd9', '#fa6ac5', '#f838b2', '#f5089f', '#c4067e', '#92055e', '#540336', '#48022f', '#30021f']"
#api: api更换为你的api地址,后续拼接步骤为: 例如我们的字符串为`user=y`,那么api=https://github-contribute.calyee.top/api?user=y
api: https://github-contribute.calyee.top/api
calendar_js: https://cdn.jsdelivr.net/npm/hexo-get-github-contribute@1.0.1/hexo_githubcalendar.js
plus_style: ""
```
对于githubcalendar.user处,我们添加的value为`user=yikoutian1`, 把等于号后面的昵称更换成你的即可
(原始代码:自 [Link](https://github.com/Zfour/python_github_calendar_api)仓库)