From d8edf08baea2630f73b02e72b1ac4bc015b00c00 Mon Sep 17 00:00:00 2001 From: wcbing Date: Tue, 29 Oct 2024 17:07:30 +0800 Subject: [PATCH] user github-downloader --- README.md | 23 ++++++++------ data/github.json | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ get/github.json | 67 ---------------------------------------- get/github.py | 31 ------------------- update_gen.sh | 14 ++++----- 5 files changed, 101 insertions(+), 114 deletions(-) create mode 100644 data/github.json delete mode 100644 get/github.json delete mode 100644 get/github.py diff --git a/README.md b/README.md index 2cc98e3..cd2d58b 100644 --- a/README.md +++ b/README.md @@ -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音乐|qqmusic|[官网](https://y.qq.com/download/download.html)| |腾讯会议|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)| |FlClash|flclash|[Github Releses](https://github.com/chen08209/FlClash/releases)| |mihomo|mihomo|[Github Releases](https://github.com/MetaCubeX/mihomo/releases)| |hugo|hugo|[Github Releases](https://github.com/gohugoio/hugo/releases)| |RustDesk|rustdesk|[Github Releases](https://github.com/rustdesk/rustdesk/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)| -|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)| |Pandoc|pandoc|[Github Releases](https://github.com/jgm/pandoc/releases)| |TinyGo|tinygo|[Github Releases](https://github.com/tinygo-org/tinygo/releases)| |LocalSend|localsend|[Github Releases](https://github.com/localsend/localsend/releases)| |Motrix|motrix|[Github Releases](https://github.com/agalwood/Motrix/releases)| -|滴答清单|dida|[官网](https://dida365.com/download) ### 合并自官方 repo diff --git a/data/github.json b/data/github.json new file mode 100644 index 0000000..1848d4e --- /dev/null +++ b/data/github.json @@ -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" + ] + } +} \ No newline at end of file diff --git a/get/github.json b/get/github.json deleted file mode 100644 index c41bd6f..0000000 --- a/get/github.json +++ /dev/null @@ -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" - } -] \ No newline at end of file diff --git a/get/github.py b/get/github.py deleted file mode 100644 index d928c30..0000000 --- a/get/github.py +++ /dev/null @@ -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) diff --git a/update_gen.sh b/update_gen.sh index 3ebc55c..556ba15 100755 --- a/update_gen.sh +++ b/update_gen.sh @@ -1,18 +1,18 @@ #!/bin/sh -# check for updates 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 {} \; # generate the files 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 cat Packages | grep "Package\|Version\|Architecture\|^\$" > version.txt # generate the Release file