From c93453125a246dc77998114ad6c206d9a85472f7 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Thu, 27 Nov 2025 14:32:40 +0200 Subject: [PATCH] =?UTF-8?q?refactor(config):=E5=BC=80=E5=A7=8B=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- example.config.yaml | 92 ++++++++++++++++++++++++++++++++++ src/clover_email/send_email.py | 1 - 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 example.config.yaml diff --git a/.gitignore b/.gitignore index aed305e..26c1d76 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ src/clover_lightnovel/wenku8.cookie src/clover_lightnovel/output1.html *.pyc /src/resources/image/jm/* - +config.yaml Elysia runtime diff --git a/example.config.yaml b/example.config.yaml new file mode 100644 index 0000000..7949059 --- /dev/null +++ b/example.config.yaml @@ -0,0 +1,92 @@ +bot: + app_id: "" + bot_account: "" + +############################ +# 三叶草邮箱发信设置 # +############################ +mail: + google: + enabled: 'False' + smtp_server: 'smtp.gmail.com' + email: 'xxxxxx@gmail.com' + password: '1234567891234567' # 16 位应用码 + + qq: + enabled: 'True' + smtp_server: 'smtp.qq.com' + email: 'xxxxxxxx@qq.com' + password: '1234567891234567' # qq邮箱应用码 + + server: # 自建服务器 + enabled: 'False' + smtp_server: 'mail.example.com' # 自建邮局域名 + email: 'user_name@example.com' + password: '123456' + port: '587' + +############################ +# 三叶草图床设置 # +############################ +image_hosting: + smms: # sm.ms图床 + enabled: 'False' + token: '' + smms_image_upload_history: "https://sm.ms/api/v2/upload_history" + + superbed: # 聚合图床 + enabled: 'False' + token: '' + superbed_image_list: "https://api.superbed.cn/timeline" + + random_pic: "https://image.anosu.top/pixiv/json" + + animetrace: + url: "https://api.animetrace.com/v1/search" + +############################ +# 三叶草AI设置 # +############################ +ai: + admin: + password: '123456' + + api: + v3: + url: "https://api.vveai.com/v1/chat/completions" + key: '' + + deepseek: + url: "https://api.deepseek.com" + key: '' + + silicon_flow: + url: "https://api.siliconflow.cn/v1/chat/completions" + model: "Pro/deepseek-ai/DeepSeek-V3" + key: '' + +############################ +# 其他时尚小功能 # +############################ + +wenku8: + # 通过wenku8.com获取最新轻小说咨询 + # 此功能需要启用代理 + enabled: 'False' + user_name: '' + password: '' + +proxy: + # 目前代码中仅支持多米HTTP代理 + enabled: 'False' + key: '' + +qr: + # 二维码生成api + url: "https://api.qrserver.com/v1/create-qr-code/" + size: "200x200" + +codeforces: + # 查询codeforces比赛列表 + key: "" + secret: "" \ No newline at end of file diff --git a/src/clover_email/send_email.py b/src/clover_email/send_email.py index d9a642d..17dba6e 100644 --- a/src/clover_email/send_email.py +++ b/src/clover_email/send_email.py @@ -196,7 +196,6 @@ async def send_email_by_server(receiver_email: str, file_path: str): msg = MIMEMultipart() msg["From"] = server_email msg["To"] = receiver_email - msg["X-No-AddSig"] = "1" msg["Subject"] = "您的快递已送达" msg.attach(MIMEText(html, "html", "utf-8"))