remove some debug info and add get_type

This commit is contained in:
qiurui 2024-01-09 16:58:18 +08:00
parent 552c94fa71
commit 5d56a89a99
2 changed files with 5 additions and 10 deletions

View File

@ -15,13 +15,13 @@ def get_wikipage(keywords):
PARAMS['search'] = key PARAMS['search'] = key
R = S.get(url=URL, params=PARAMS) R = S.get(url=URL, params=PARAMS)
DATA = R.json() DATA = R.json()
print(DATA) #print(DATA)
print(DATA[3][0]) #print(DATA[3][0])
return DATA[3][0] return DATA[3][0]
#获取commit的关键词如ext4 #获取commit的关键词如ext4
def get_commit_kerywords(abbr): def get_commit_kerywords(abbr):
print(abbr.split()) #print(abbr.split())
for abb in abbr.split(): for abb in abbr.split():
if abb.endswith(":"): if abb.endswith(":"):
keywords = abb.replace(':','') keywords = abb.replace(':','')
@ -30,12 +30,11 @@ def get_commit_kerywords(abbr):
#获取commit的类型 #获取commit的类型
def get_commit_type(body): def get_commit_type(body):
for line in body: for line in body.split("\n"):
#print(line) #print(line)
if line.startswith("category"): if line.startswith("category"):
return line.replace('category:','') return line.replace('category:','')
else: return ""
return ""
def get_CVE_code(body): def get_CVE_code(body):
return "" return ""

View File

@ -12,10 +12,6 @@ def mkdir(path):
# 判断结果 # 判断结果
if not isExists: if not isExists:
os.makedirs(path) os.makedirs(path)
print (path + " 创建成功")
else:
# 如果目录存在则不创建,并提示目录已存在
print (path + " 目录已存在")
#初始化kernel log summary的markdown文件 #初始化kernel log summary的markdown文件
def initmd(version1,version2,source): def initmd(version1,version2,source):