v05 log update 02

This commit is contained in:
13339479676 2022-01-28 09:52:35 +08:00
parent 3aeb82bc8b
commit 7d1297599b
2 changed files with 10 additions and 5 deletions

View File

@ -3,6 +3,7 @@
# 创建时间2022-01-14
import sys
import re
ROOT_PATH = sys.path[0] # 项目根目录
@ -25,11 +26,14 @@ def log_management(logContent, logName, logSaveMode):
# 日志读取时间和帧数
def log2date_frames(log_path="../ows.log"):
f = open(log_path, 'r') # 读取日志
f_list = f.read().split('\n')[:-1] # 转换成列表
f = open(log_path, 'r') # 读取日志
f_list = f.read().split('\n')[:-1] # 转换成列表
for i in range(len(f_list)):
print(f_list[i])
mat = re.search(
r"(\d{4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2})", f_list[i])
if (mat != None):
print(f'{i, f_list[i]}')
if __name__ == '__main__':

View File

@ -5,9 +5,10 @@
import matplotlib.pyplot as plt
from matplotlib import font_manager
import sys
OWS_VERSION = 'OpenCV Webcam Script v0.5' # 版本号
# ROOT_PATH = sys.path[0] # 项目根目录
# 宋体
SimSun = font_manager.FontProperties(fname="./fonts/SimSun.ttc", size=12)