add trending-api
This commit is contained in:
27
src/get_daily_trending.py
Normal file
27
src/get_daily_trending.py
Normal file
@ -0,0 +1,27 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
def fetch_trending_repos():
|
||||
url = "https://api.gitterapp.com/"
|
||||
headers = {"Accept": "application/json"}
|
||||
response = requests.get(url, headers=headers)
|
||||
response.raise_for_status() # make sure to raise an error if the request fails
|
||||
return response.json()
|
||||
|
||||
def save_as_markdown(repos):
|
||||
with open('trending.md', 'w', encoding='utf-8') as f:
|
||||
f.write("|名称|Stars|简介|备注|\n")
|
||||
f.write("|---|---|---|---|\n")
|
||||
for repo in repos:
|
||||
name = repo['author'] + '/' + repo['name']
|
||||
url = 'https://github.com/' + name
|
||||
stars = ''
|
||||
description = repo['description'] or 'No Description'
|
||||
f.write(f"|[{name}]({url})|{stars}|{description}|-|\n")
|
||||
|
||||
def main():
|
||||
repos = fetch_trending_repos()
|
||||
save_as_markdown(repos)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
27
src/trending.md
Normal file
27
src/trending.md
Normal file
@ -0,0 +1,27 @@
|
||||
|名称|Stars|简介|备注|
|
||||
|---|---|---|---|
|
||||
|[sadmann7/skateshop](https://github.com/sadmann7/skateshop)||An open source e-commerce skateshop build with everything new in Next.js 13.|-|
|
||||
|[sveltejs/svelte](https://github.com/sveltejs/svelte)||Cybernetically enhanced web apps|-|
|
||||
|[Stability-AI/generative-models](https://github.com/Stability-AI/generative-models)||Generative Models by Stability AI|-|
|
||||
|[CASIA-IVA-Lab/FastSAM](https://github.com/CASIA-IVA-Lab/FastSAM)||Fast Segment Anything|-|
|
||||
|[a16z-infra/ai-getting-started](https://github.com/a16z-infra/ai-getting-started)||A Javascript AI getting started stack for weekend projects, including image/text models, vector stores, auth, and deployment configs|-|
|
||||
|[spacedriveapp/spacedrive](https://github.com/spacedriveapp/spacedrive)||Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.|-|
|
||||
|[SkalskiP/top-cvpr-2023-papers](https://github.com/SkalskiP/top-cvpr-2023-papers)||This repository is a curated collection of the most exciting and influential CVPR 2023 papers. 🔥 [Paper + Code]|-|
|
||||
|[zksync/credo](https://github.com/zksync/credo)||No Description|-|
|
||||
|[chat2db/Chat2DB](https://github.com/chat2db/Chat2DB)||🔥 🔥 🔥 An intelligent and versatile general-purpose SQL client and reporting tool for databases which integrates ChatGPT capabilities.(智能的通用数据库SQL客户端和报表工具)|-|
|
||||
|[embedchain/embedchain](https://github.com/embedchain/embedchain)||Framework to easily create LLM powered bots over any dataset.|-|
|
||||
|[papers-we-love/papers-we-love](https://github.com/papers-we-love/papers-we-love)||Papers from the computer science community to read and discuss.|-|
|
||||
|[ventoy/Ventoy](https://github.com/ventoy/Ventoy)||A new bootable USB solution.|-|
|
||||
|[sindresorhus/awesome](https://github.com/sindresorhus/awesome)||😎 Awesome lists about all kinds of interesting topics|-|
|
||||
|[ramonvc/freegpt-webui](https://github.com/ramonvc/freegpt-webui)||GPT 3.5/4 with a Chat Web UI. No API key required.|-|
|
||||
|[nayuki/QR-Code-generator](https://github.com/nayuki/QR-Code-generator)||High-quality QR Code generator library in Java, TypeScript/JavaScript, Python, Rust, C++, C.|-|
|
||||
|[devfullcycle/imersao13](https://github.com/devfullcycle/imersao13)||No Description|-|
|
||||
|[PlexPt/awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh)||ChatGPT 中文调教指南。各种场景使用指南。学习怎么让它听你的话。|-|
|
||||
|[TodePond/DreamBerd](https://github.com/TodePond/DreamBerd)||perfect programming language|-|
|
||||
|[PCSX2/pcsx2](https://github.com/PCSX2/pcsx2)||PCSX2 - The Playstation 2 Emulator|-|
|
||||
|[s0md3v/sd-webui-roop](https://github.com/s0md3v/sd-webui-roop)||roop extension for StableDiffusion web-ui|-|
|
||||
|[xtekky/gpt4free](https://github.com/xtekky/gpt4free)||The official gpt4free repository | various collection of powerful language models|-|
|
||||
|[acidanthera/OpenCorePkg](https://github.com/acidanthera/OpenCorePkg)||OpenCore bootloader|-|
|
||||
|[firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions)||🚀✨ Help beginners to contribute to open source projects|-|
|
||||
|[Rapptz/discord.py](https://github.com/Rapptz/discord.py)||An API wrapper for Discord written in Python.|-|
|
||||
|[OpenDriveLab/UniAD](https://github.com/OpenDriveLab/UniAD)||[CVPR 2023 Best Paper] Planning-oriented Autonomous Driving|-|
|
||||
Reference in New Issue
Block a user