编写脚本

This commit is contained in:
LiuEnder
2026-05-07 21:33:36 +08:00
parent 3c29415e94
commit bfc1aa87f2
2 changed files with 202 additions and 1 deletions

View File

@@ -2,13 +2,22 @@
## 功能
每天从https://git.ociflab.icu/Laplace/backup-list拉取whitelist.md
如果没拉取到则使用前一天拉取并保存的whitelist文件。
如果超过三分之一的仓库都拉取错误则给脚本中设置的server酱3 Pushkey推送警告信息。
然后根据whitelist.md拉取对应的仓库到backup文件夹进行备份
压缩成zip每天定时备份一次保留7天。
使用Python
使用bash
## whitelist.md文件结构
~~~
https://git.ociflab.icu/userA/projectA
https://git.ociflab.icu/userB/projectB
~~~
## server酱3参考
~~~bash
# 一行代码即可调用中文参数需要UrlEncode长内容建议使用POST
curl "https://<uid>.push.ft07.com/send/<sendkey>.send?title=<title>&desp=<desp>"
~~~