From a4f96a5d3a8eddd914d0c4586ef7ae87c6af376b Mon Sep 17 00:00:00 2001 From: wcbing Date: Mon, 2 Sep 2024 18:33:16 +0800 Subject: [PATCH] add sublime-text --- README.md | 1 + get/sublime.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 get/sublime.py diff --git a/README.md b/README.md index 613c3cf..1d1bc51 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ echo "deb [signed-by=/etc/apt/keyrings/wcbing.gpg] https://packages.wcbing.top/d |钉钉|com.alibabainc.dingtalk|[官网](https://www.dingtalk.com/download/)| |飞书|bytedance-feishu-stable|[官网](https://www.feishu.cn/download)| |termius|termius-app
termius-beta|官方仓库| +|Sublime Text|sublime-text|[官网](https://www.sublimetext.com/download)| ## 自行建立仓库 diff --git a/get/sublime.py b/get/sublime.py new file mode 100644 index 0000000..58a4a43 --- /dev/null +++ b/get/sublime.py @@ -0,0 +1,11 @@ +import requests +import re +from module.check import deb + +req = requests.get("https://www.sublimetext.com/download_thanks?target=x64-deb") + +x64_deb_url = re.findall('url = "(.*amd64.deb)"', req.text)[0] +# https://download.sublimetext.com/sublime-text_build-4180_amd64.deb +version = x64_deb_url.split("-")[-1].split("_")[0] + +deb("sublime-text", version, x64_deb_url)