8 Commits
v3.2.2 ... main

Author SHA1 Message Date
MarkusJoe
7a766efa8a Merge branch 'main' of https://github.com/MarkusJoe/QWeatherReporter 2022-04-01 22:06:54 +08:00
MarkusJoe
71eb2472ce update requirements.txt 2022-04-01 22:05:15 +08:00
RTAkland
1b3d1e2875 Update README.md 2022-03-19 13:03:09 +08:00
RTAkland
025e0d8664 feat: fix a bug 2022-01-14 22:51:25 +08:00
RTAkland
44f694f82e feat: update README.md 2022-01-14 18:45:26 +08:00
RTAkland
b41be502f2 feat: fix bug 2022-01-01 15:34:45 +08:00
RTAkland
cc8bed1890 feat: update README.md 2022-01-01 15:33:20 +08:00
RTAkland
9174e11ecd feat: fix bug 2022-01-01 15:32:38 +08:00
5 changed files with 20 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
<p align="center"> <p align="center">
<a href="https://github.com/MarkusJoe/QWeather"> <a href="https://github.com/MarkusJoe/QWeather">
<img src="https://img.shields.io/badge/Python-3.10.x-blue.svg" alt="PythonVersion"> <img src="https://img.shields.io/badge/Python-3.10.x-blue.svg" alt="PythonVersion">
<img src="https://img.shields.io/badge/release-3.2.2-green.svg" alt="QWeatherVersion"> <img src="https://img.shields.io/badge/release-3.2.3-green.svg" alt="QWeatherVersion">
<img src="https://img.shields.io/badge/LINCESE-Apache2.0-orange.svg" alt="LICENSE"> <img src="https://img.shields.io/badge/LINCESE-Apache2.0-orange.svg" alt="LICENSE">
</a> </a>
</p> </p>
@@ -15,10 +15,6 @@
</div> </div>
<div align="center">
<b><i>当前分支版本为重构后的版本重构前版本请在before分支中查看<br>(重构前版本不再更新,最新版本为v2.9.0)</i></b><br>
<b><i><a href="https://markusjoe.github.io/" target="_blank">点击跳转到帮助文档</a></i></b>
</div>
## 声明 ## 声明
- > 程序作者: **RTAkland (markushammered@gmail.com)** - > 程序作者: **RTAkland (markushammered@gmail.com)**

View File

@@ -17,6 +17,10 @@ from core.read_config import read_config
from core.sendmail import Mail from core.sendmail import Mail
from lib.webservice import accept_requests from lib.webservice import accept_requests
language = Language()
settings = read_config()
processes = ProcessPoolExecutor(max_workers=3)
def check_time(): def check_time():
""" """
@@ -83,6 +87,12 @@ def main():
主程序 主程序
:return: :return:
""" """
Logger.info(f'{language["statement_1"]}')
Logger.info(f'{language["statement_2"]}')
Logger.info(f'{language["statement_3"]}')
Logger.info(f'{language["statement_4"]}')
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
arg_keywords = ['free', 'dev', 'warning', 'setting'] arg_keywords = ['free', 'dev', 'warning', 'setting']
parser.add_argument('-t', parser.add_argument('-t',
@@ -125,14 +135,3 @@ def main():
if time_count == 600: if time_count == 600:
Mail().warning_() Mail().warning_()
time_count = 0 time_count = 0
if __name__ != '__main__':
language = Language()
settings = read_config()
processes = ProcessPoolExecutor(max_workers=3)
Logger.info(f'{language["statement_1"]}')
Logger.info(f'{language["statement_2"]}')
Logger.info(f'{language["statement_3"]}')
Logger.info(f'{language["statement_4"]}')

View File

@@ -14,7 +14,7 @@ def read_config():
:return: mail-settings, request-settings, client-settings, only-view-settings --> 0, 1, 2, 3 :return: mail-settings, request-settings, client-settings, only-view-settings --> 0, 1, 2, 3
""" """
config_file = 'config.yml' config_file = 'config.yml'
with open(f'./{config_file}', 'r') as conf: with open(f'./{config_file}', 'r', encoding='utf-8') as conf:
config = YAML().load(conf.read()) config = YAML().load(conf.read())
mail_settings = config['mail-settings'] mail_settings = config['mail-settings']
request_settings = config['request-settings'] request_settings = config['request-settings']

View File

@@ -13,10 +13,13 @@ from core.read_config import read_config
from core.information import WeatherInfo from core.information import WeatherInfo
from core.language import Language from core.language import Language
try:
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(('0.0.0.0', 7898)) server.bind(('0.0.0.0', 7898))
server.listen(5) server.listen(5)
except OSError as e:
Logger.critical(e)
language = Language() language = Language()

View File

@@ -1,5 +1,5 @@
requests>=2.26.0 requests>=2.26.0
ruamel.yaml>=0.17.17 ruamel.yaml>=0.17.17
pandas>=1.3.4 pandas==1.3.4
colorlog>=6.5.0 colorlog>=6.5.0
openpyxl>=3.0.9 openpyxl>=3.0.9