Skip to content

Commit

Permalink
🔨 青龙环境直接使用内置的通知模块 close #15
Browse files Browse the repository at this point in the history
  • Loading branch information
Cp0204 committed May 11, 2024
1 parent 54b2ae3 commit b1d4b48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtow
1. 拉库命令:

```
ql repo https://github.com/Cp0204/quark-auto-save.git "quark" "" "sendNotify"
ql repo https://github.com/Cp0204/quark-auto-save.git "quark" "" ""
```

2. 首次运行程序将从本仓库下载配置模版。

3. 脚本管理中,手动编辑 `quark_config.json` 配置文件。

> 当无配置文件时且存在青龙环境变量 `QUARK_COOKIE` 时,则仅签到,多账号用换行分隔。
> 删除配置文件,且存在青龙环境变量 `QUARK_COOKIE` 时,则仅签到,多账号用换行分隔。
### 程序配置

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions quark_auto_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def magic_regex_func(pattern, replace):
def send_ql_notify(title, body):
try:
# 导入通知模块
import sendNotify
import notify

# 如未配置 push_config 则使用青龙环境通知设置
if CONFIG_DATA.get("push_config"):
CONFIG_DATA["push_config"]["CONSOLE"] = True
sendNotify.push_config = CONFIG_DATA["push_config"]
sendNotify.send(title, body)
notify.push_config = CONFIG_DATA["push_config"]
notify.send(title, body)
except Exception as e:
if e:
print("发送通知消息失败!")
Expand Down

0 comments on commit b1d4b48

Please sign in to comment.