删去database_tools中一个无用的功能
This commit is contained in:
parent
4a7a5cb703
commit
1f731ec788
|
|
@ -148,21 +148,6 @@ def spareIDs(dictname): #返回空闲题号
|
|||
output += "首个空闲id: %s, 直至: %s"%(str(int(used_list[-1][-6:])+1).zfill(6),"999999")
|
||||
return output #返回的是一个多行的字符串, 每一行中含有一个空闲题号的闭区间
|
||||
|
||||
def parse_usage(datastring): #对单个usages中的项的结果进行分词
|
||||
datastring = re.sub(r"\s+","\t",datastring.strip())
|
||||
datalist = datastring.split("\t")
|
||||
date = ""
|
||||
classname = ""
|
||||
diff = []
|
||||
for item in datalist:
|
||||
if not "." in item and not "高" in item and not "班" in item:
|
||||
date = item
|
||||
elif "高" in item or "班" in item:
|
||||
classname = item
|
||||
else:
|
||||
diff.append(item)
|
||||
return({"date":date,"classname":classname,"difficulty":diff}) #返回一个字典, "date"表示日期, "classname"表示班级, "difficultiy"表示难度列表
|
||||
|
||||
|
||||
def GenerateProblemListFromString(data): #从来自.tex文件的字符串生成题目列表, 每个item是一道题目, 新一行的%用作前缀
|
||||
try:
|
||||
|
|
|
|||
Reference in New Issue