错题重做来源题目加了一个括号,方便用regex搜索
This commit is contained in:
parent
aae4864e9c
commit
141b1fd3a6
|
|
@ -55,19 +55,19 @@ for texfile in new_texfiles:
|
||||||
print(",".join(ids))
|
print(",".join(ids))
|
||||||
for id in ids:
|
for id in ids:
|
||||||
if id in id_resp_dict:
|
if id in id_resp_dict:
|
||||||
print("%s\t(已做题)\t%s"%(id,",".join(id_resp_dict[id])))
|
print("(%s)\t(已做题)\t%s"%(id,",".join(id_resp_dict[id])))
|
||||||
output += "%s\t(已做题)\t%s\n"%(id,",".join(id_resp_dict[id]))
|
output += "(%s)\t(已做题)\t%s\n"%(id,",".join(id_resp_dict[id]))
|
||||||
elif id_related:
|
elif id_related:
|
||||||
rel_ids = pro_dict[id]["related"]
|
rel_ids = pro_dict[id]["related"]
|
||||||
origins = []
|
origins = []
|
||||||
for id in rel_ids:
|
for id in rel_ids:
|
||||||
if id in id_resp_dict:
|
if id in id_resp_dict:
|
||||||
origins += id_resp_dict[id]
|
origins += id_resp_dict[id]
|
||||||
print("%s\t(关联题)\t%s"%(id,",".join(origins)))
|
print("(%s)\t(关联题)\t%s"%(id,",".join(origins)))
|
||||||
output += "%s\t(关联题)\t%s\n"%(id,",".join(origins))
|
output += "(%s)\t(关联题)\t%s\n"%(id,",".join(origins))
|
||||||
else:
|
else:
|
||||||
print("%s\t(无关题)")
|
print("(%s)\t(无关题)")
|
||||||
output += "%s\t(无关题)\n"
|
output += "(%s)\t(无关题)\n"
|
||||||
print("")
|
print("")
|
||||||
output += "\n"
|
output += "\n"
|
||||||
|
|
||||||
|
|
|
||||||
Reference in New Issue