From 3034346c73c54ff979443777fff763a619a9d380 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Fri, 24 Dec 2021 18:55:11 +0800 Subject: [PATCH] feat: removed some text --- core/sendmail.py | 35 +++++++++++++++++++++++------------ lib/hitokoto.py | 5 +++++ 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 lib/hitokoto.py diff --git a/core/sendmail.py b/core/sendmail.py index a3086f1..565ca9d 100644 --- a/core/sendmail.py +++ b/core/sendmail.py @@ -16,6 +16,7 @@ from core.logger import Logger from core.language import Language from core.information import WeatherInfo from core.read_config import read_config +from lib.hitokoto import hitokoto class Mail: @@ -33,6 +34,8 @@ class Mail: self.message['From'] = Header('QWeather') # 发件人名称 self.message['To'] = Header('All allowed User') # 收件人显示名称 + self.hitokoto = hitokoto() # 一言 + if self.enableSSL: self.smtp = smtplib.SMTP_SSL(self.server, self.port) # 登录服务器 使用SSL连接 else: @@ -128,8 +131,8 @@ class Mail:   - 风速/风级/风向 - 相对湿度 + 风速/级/向 + 湿度 紫外线 @@ -142,8 +145,8 @@ class Mail: 能见度 - 大气压强 - 相对云量 + 压强 + 云量 {vis}km  @@ -166,9 +169,13 @@ class Mail:  {sunset}  +
+
+

+ {self.hitokoto} +

+
-
-

@@ -271,8 +278,8 @@ class Mail:   - 风速/风级/风向 - 相对湿度 + 风速/级/向 + 湿度 紫外线 @@ -285,8 +292,8 @@ class Mail: 能见度 - 大气压强 - 相对云量 + 压强 + 云量 {vis}km  @@ -309,9 +316,13 @@ class Mail:  {sunset}  +
+
+

+ {self.hitokoto} +

+
-
-

diff --git a/lib/hitokoto.py b/lib/hitokoto.py new file mode 100644 index 0000000..1226cb3 --- /dev/null +++ b/lib/hitokoto.py @@ -0,0 +1,5 @@ +# -- coding:utf-8 -- +# @Author: markushammered@gmail.com +# @Development Tool: PyCharm +# @Create Time: 2021/12/24 +# @File Name: hitokoto.py \ No newline at end of file