user github-downloader

This commit is contained in:
wcbing 2024-10-29 17:07:30 +08:00
parent 2073c60449
commit d8edf08bae
5 changed files with 101 additions and 114 deletions

View File

@ -25,31 +25,36 @@ echo "deb [signed-by=/etc/apt/keyrings/wcbing.gpg] https://packages.wcbing.top/d
### 自行收集 ### 自行收集
|软件名|包名|渠道| |软件名|包名|地址|
|-|-|-| |-|-|-|
|QQ|linuxqq|[官网](https://im.qq.com/linuxqq/)| |QQ|linuxqq|[官网](https://im.qq.com/linuxqq/)|
|QQ音乐|qqmusic|[官网](https://y.qq.com/download/download.html)| |QQ音乐|qqmusic|[官网](https://y.qq.com/download/download.html)|
|腾讯会议|wemeet|[官网](https://meeting.tencent.com/download/)| |腾讯会议|wemeet|[官网](https://meeting.tencent.com/download/)|
|WPS Office|wps-office|[官网](https://linux.wps.cn/)|
|百度网盘|baidunetdisk|[官网](https://pan.baidu.com/download)|
|钉钉|com.alibabainc.dingtalk|[官网](https://www.dingtalk.com/download/)|
|飞书|bytedance-feishu-stable|[官网](https://www.feishu.cn/download)|
|Xmind|xmind-vana|[官网](https://xmind.cn/download/)|
|uTools|utools|[官网](https://u.tools/download/)|
|360安全浏览器|browser360-cn-stable|[官网](https://browser.360.net/gc/)|
|滴答清单|dida|[官网](https://dida365.com/download)|
### Github Releses
|软件名|包名|地址|
|-|-|-|
|Clash Verge Rev|clash-verge|[Github Releses](https://github.com/clash-verge-rev/clash-verge-rev/releases)| |Clash Verge Rev|clash-verge|[Github Releses](https://github.com/clash-verge-rev/clash-verge-rev/releases)|
|FlClash|flclash|[Github Releses](https://github.com/chen08209/FlClash/releases)| |FlClash|flclash|[Github Releses](https://github.com/chen08209/FlClash/releases)|
|mihomo|mihomo|[Github Releases](https://github.com/MetaCubeX/mihomo/releases)| |mihomo|mihomo|[Github Releases](https://github.com/MetaCubeX/mihomo/releases)|
|hugo|hugo|[Github Releases](https://github.com/gohugoio/hugo/releases)| |hugo|hugo|[Github Releases](https://github.com/gohugoio/hugo/releases)|
|RustDesk|rustdesk|[Github Releases](https://github.com/rustdesk/rustdesk/releases)| |RustDesk|rustdesk|[Github Releases](https://github.com/rustdesk/rustdesk/releases)|
|Obsidian|obsidian|[Github Releases](https://github.com/obsidianmd/obsidian-releases/releases)| |Obsidian|obsidian|[Github Releases](https://github.com/obsidianmd/obsidian-releases/releases)|
|WPS Office|wps-office|[官网](https://linux.wps.cn/)|
|百度网盘|baidunetdisk|[官网](https://pan.baidu.com/download)|
|钉钉|com.alibabainc.dingtalk|[官网](https://www.dingtalk.com/download/)|
|飞书|bytedance-feishu-stable|[官网](https://www.feishu.cn/download)|
|Xmind|xmind-vana|[官网](https://xmind.cn/download/)|
|draw.io|draw.io|[Github Releases](https://github.com/jgraph/drawio-desktop/releases)| |draw.io|draw.io|[Github Releases](https://github.com/jgraph/drawio-desktop/releases)|
|uTools|utools|[官网](https://u.tools/download/)|
|360安全浏览器|browser360-cn-stable|[官网](https://browser.360.net/gc/)|
|Tabby|tabby-terminal|[Github Releases](https://github.com/Eugeny/tabby/releases)| |Tabby|tabby-terminal|[Github Releases](https://github.com/Eugeny/tabby/releases)|
|Pandoc|pandoc|[Github Releases](https://github.com/jgm/pandoc/releases)| |Pandoc|pandoc|[Github Releases](https://github.com/jgm/pandoc/releases)|
|TinyGo|tinygo|[Github Releases](https://github.com/tinygo-org/tinygo/releases)| |TinyGo|tinygo|[Github Releases](https://github.com/tinygo-org/tinygo/releases)|
|LocalSend|localsend|[Github Releases](https://github.com/localsend/localsend/releases)| |LocalSend|localsend|[Github Releases](https://github.com/localsend/localsend/releases)|
|Motrix|motrix|[Github Releases](https://github.com/agalwood/Motrix/releases)| |Motrix|motrix|[Github Releases](https://github.com/agalwood/Motrix/releases)|
|滴答清单|dida|[官网](https://dida365.com/download)
### 合并自官方 repo ### 合并自官方 repo

80
data/github.json Normal file
View File

@ -0,0 +1,80 @@
{
"clash-verge": {
"repo": "clash-verge-rev/clash-verge-rev",
"file_list": [
"clash-verge_{stripped_version}_amd64.deb"
]
},
"mihomo": {
"repo": "MetaCubeX/mihomo",
"file_list": [
"mihomo-linux-amd64-compatible-{version_tag}.deb"
]
},
"flclash": {
"repo": "chen08209/FlClash",
"file_list": [
"FlClash-{stripped_version}-linux-amd64.deb"
]
},
"hugo": {
"repo": "gohugoio/hugo",
"file_list": [
"hugo_{stripped_version}_linux-amd64.deb"
]
},
"rustdesk": {
"repo": "rustdesk/rustdesk",
"file_list": [
"rustdesk-{version_tag}-x86_64.deb"
]
},
"obsidian": {
"repo": "obsidianmd/obsidian-releases",
"file_list": [
"obsidian_{stripped_version}_amd64.deb"
]
},
"draw.io": {
"repo": "jgraph/drawio-desktop",
"file_list": [
"drawio-amd64-{stripped_version}.deb"
]
},
"tabby": {
"repo": "Eugeny/tabby",
"file_list": [
"tabby-{stripped_version}-linux-x64.deb"
]
},
"pandoc": {
"repo": "jgm/pandoc",
"file_list": [
"pandoc-{version_tag}-1-amd64.deb"
]
},
"tinygo": {
"repo": "tinygo-org/tinygo",
"file_list": [
"tinygo_{stripped_version}_amd64.deb"
]
},
"chezmoi": {
"repo": "twpayne/chezmoi",
"file_list": [
"chezmoi_{stripped_version}_linux_amd64.deb"
]
},
"localsend": {
"repo": "localsend/localsend",
"file_list": [
"LocalSend-{stripped_version}-linux-x86-64.deb"
]
},
"motrix": {
"repo": "agalwood/Motrix",
"file_list": [
"Motrix_{stripped_version}_amd64.deb"
]
}
}

View File

@ -1,67 +0,0 @@
[
{
"name": "hugo",
"repo": "gohugoio/hugo",
"x64_deb_name": "{version_tag}/hugo_{stripped_version}_linux-amd64.deb"
},
{
"name": "flclash",
"repo": "chen08209/FlClash",
"x64_deb_name": "{version_tag}/FlClash-{stripped_version}-linux-amd64.deb"
},
{
"name": "clash-verge",
"repo": "clash-verge-rev/clash-verge-rev",
"x64_deb_name": "{version_tag}/clash-verge_{stripped_version}_amd64.deb"
},
{
"name": "mihomo",
"repo": "MetaCubeX/mihomo",
"x64_deb_name": "{version_tag}/mihomo-linux-amd64-compatible-{version_tag}.deb"
},
{
"name": "obsidian",
"repo": "obsidianmd/obsidian-releases",
"x64_deb_name": "{version_tag}/obsidian_{stripped_version}_amd64.deb"
},
{
"name": "rustdesk",
"repo": "rustdesk/rustdesk",
"x64_deb_name": "{version_tag}/rustdesk-{version_tag}-x86_64.deb"
},
{
"name": "draw.io",
"repo": "jgraph/drawio-desktop",
"x64_deb_name": "{version_tag}/drawio-amd64-{stripped_version}.deb"
},
{
"name": "tabby",
"repo": "Eugeny/tabby",
"x64_deb_name": "{version_tag}/tabby-{stripped_version}-linux-x64.deb"
},
{
"name": "pandoc",
"repo": "jgm/pandoc",
"x64_deb_name": "{version_tag}/pandoc-{version_tag}-1-amd64.deb"
},
{
"name": "tinygo",
"repo": "tinygo-org/tinygo",
"x64_deb_name": "{version_tag}/tinygo_{stripped_version}_amd64.deb"
},
{
"name": "chezmoi",
"repo": "twpayne/chezmoi",
"x64_deb_name": "{version_tag}/chezmoi_{stripped_version}_linux_amd64.deb"
},
{
"name": "localsend",
"repo": "localsend/localsend",
"x64_deb_name": "{version_tag}/LocalSend-{stripped_version}-linux-x86-64.deb"
},
{
"name": "motrix",
"repo": "agalwood/Motrix",
"x64_deb_name": "{version_tag}/Motrix_{stripped_version}_amd64.deb"
}
]

View File

@ -1,31 +0,0 @@
import requests
import json
from module.check import deb
github_info_list = []
# read all repo info from json file
with open("get/github.json", "r") as all_repo_info:
github_info_list = json.loads(all_repo_info.read())
all_repo_info.close()
"""
repo info json format:
{
"name": name
"repo": repo
"x64_deb_name": x86 deb file name
}
"""
# get version info from repo
for i in github_info_list:
repo = i["repo"]
release_url = f"https://github.com/{repo}/releases/"
latest_req = requests.head(release_url + "latest")
version_tag = latest_req.headers["Location"].split("/")[-1] # v1.1.1
stripped_version = version_tag[1:] # 1.1.1
x64_deb_name = i["x64_deb_name"].format(version_tag=version_tag, stripped_version=stripped_version)
x64_deb_url = release_url + "download/" + x64_deb_name
deb(i["name"], version_tag, x64_deb_url)

View File

@ -1,18 +1,18 @@
#!/bin/sh #!/bin/sh
# check for updates
date date
# merge the Packages files of third-party repositories
rm deb/Packages
merge-apt-repo
# check for updates
github-downloader -r
find get -maxdepth 1 -type f -name "*.py" -exec python3 {} \; find get -maxdepth 1 -type f -name "*.py" -exec python3 {} \;
# generate the files # generate the files
cd deb cd deb
apt-ftparchive packages . > Packages apt-ftparchive packages . >> Packages
# merge the Packages files of third-party repositories
cd ..
./merge-apt-repo
cd deb
# list brief information about packages # list brief information about packages
cat Packages | grep "Package\|Version\|Architecture\|^\$" > version.txt cat Packages | grep "Package\|Version\|Architecture\|^\$" > version.txt
# generate the Release file # generate the Release file