add obsidian

This commit is contained in:
wcbing 2024-08-01 20:07:53 +08:00
parent 3cf2c25629
commit dbd8bfc127
2 changed files with 19 additions and 0 deletions

View File

@ -34,6 +34,7 @@ echo "deb [signed-by=/etc/apt/keyrings/wcbing.gpg] https://deb.wcbing.top /" | s
|Visual Studio Code|code|[官网](https://code.visualstudio.com)|
|Microsoft Edge|microsoft-edge-stable|[官网](https://www.microsoft.com/en-us/edge/download)|
|Google Chrome|google-chrome-stable|[官网](https://www.google.com/chrome/)|
|Obsidian|obsidian|[Github Releases](https://github.com/obsidianmd/obsidian-releases/releases)|
## 自行建立仓库

18
get/obsidian.py Normal file
View File

@ -0,0 +1,18 @@
import requests
from module.check import check_download
name = "obsidian"
release_url = "https://github.com/obsidianmd/obsidian-releases/releases"
res = requests.head(release_url + "/latest", allow_redirects=False)
vversion = requests.Session().get_redirect_target(res).split("/")[-1] # v1.1.1
version = vversion[1:] # 1.1.1
# print(vversion, version)
# /v1.6.7/obsidian_1.6.7_amd64.deb
x64_deb_url = (
release_url + "/download/" + vversion + "/" + name + "_" + version + "_amd64.deb"
)
check_download(name, version, x64_deb_url)