auto: sync OpenClaw config 2026-08-21 17:17

This commit is contained in:
2026-08-21 17:17:08 +08:00
parent 8b5d3fed21
commit cfadeacfa5
35 changed files with 1731 additions and 92 deletions
+15 -7
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
G5 周报发送脚本
G6 周报发送脚本
用法:构造多段邮件(纯文本 + HTML),存入钉邮草稿箱
"""
import email
@@ -36,16 +36,24 @@ IMAP_PORT = 993
IMAP_USER = _ENV.get('WITSOFT_IMAP_USER', 'yangxuan@witsoft.cn')
IMAP_PASSWORD = _ENV.get('WITSOFT_IMAP_PASSWORD', '')
def send_to_drafts(plain_body: str, html_body: str, date_range: str):
"""构造多段邮件并存入钉邮草稿箱"""
def send_to_drafts(plain_body: str, html_body: str, date_range: str, project: str = "G6"):
"""构造多段邮件并存入钉邮草稿箱
Args:
plain_body: 纯文本正文
html_body: HTML 正文
date_range: 日期范围字符串
project: 项目名称,默认"G6",用于邮件主题
"""
msg = MIMEMultipart('related')
msg['From'] = Header('杨轩', 'utf-8').encode() + ' <yangxuan@witsoft.cn>'
msg['To'] = Header('刘强', 'utf-8').encode() + ' <liuqiang@witsoft.cn>'
msg['Cc'] = (
Header('陈明', 'utf-8').encode() + ' <chenm@witsoft.cn>, '
+ Header('曾莉', 'utf-8').encode() + ' <zengli@witsoft.cn>'
+ Header('曾莉', 'utf-8').encode() + ' <zengli@witsoft.cn>, '
+ Header('袁晴', 'utf-8').encode() + ' <yuanq@witsoft.cn>'
)
msg['Subject'] = Header(f'G5开发周报 ({date_range})', 'utf-8').encode()
msg['Subject'] = Header(f'{project}开发周报 ({date_range})', 'utf-8').encode()
alt = MIMEMultipart('alternative')
alt.attach(MIMEText(plain_body, 'plain', 'utf-8'))
@@ -64,7 +72,7 @@ def send_to_drafts(plain_body: str, html_body: str, date_range: str):
if __name__ == '__main__':
# 测试
plain = """项目名称: 维云智造G5
plain = """项目名称: 维云智造 G6
主要任务: 测试
本周工作内容
@@ -74,5 +82,5 @@ if __name__ == '__main__':
存在问题
"""
html = "<p>test</p>"
result = send_to_drafts(plain, html, "2026-07-13 ~ 2026-07-17")
result = send_to_drafts(plain, html, "2026-07-13 ~ 2026-07-17", "G6")
print(result)